how to make script run at logout (caution: this method is recommended for admin level tasks to be run on the machine before logout/shutdown):
If the script name is fooOnLogout.sh, then do the following steps (also make sure that the script is executable):
sudo cp fooOnLogout.sh /etc/init.d
sudo ln -s /etc/init.d/fooOnLogout.sh /etc/rc0.d/K10fooOnLogout.sh
sudo ln -s /etc/init.d/fooOnLogout.sh /etc/rc6.d/K10fooOnLogout.sh
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment