Re: i want to run script when user shutdown his system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


[email protected] wrote:
> hi freind
> donot mind if ihave no enough idea about how to ask question
> i have one shell script   /root/
> i want to run this script when user shutdown his/her system
> so where i place this file or what can i do
If you are talking about when they shut down the computer, then,
depending on what the script does, you may be able to move it to
/sbin/halt.local, or you can create a script for /etc/rc.d/init.d
that will be run on shutdown before the halt script. One thing to be
aware of is that when /sbin/halt.local is run, everything except the
root file system and the ramdisk is unmounted.

If you are talking about when a user logs out, then that is a
different matter, and depends on the shell or desktop used, and if
it is a CLI or GUI login.


  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux