LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Run commands at logout/shutdown (https://www.linuxquestions.org/questions/linux-general-1/run-commands-at-logout-shutdown-84178/)

sbaguz 08-21-2003 09:53 AM

Run commands at logout/shutdown
 
Hi all !
I have been using Linux RH9 for a month and I'm already an addicted ! :D Reading this forum, I've found a lot of answers to my newbie questions, but now I have to ask something.
I know that you have to put your script in /etc/rc.d/rc.local if you want to run a command at startup, but what about running it at logout or shutdown? Where do I have to put it?
Thanks in advance

P.S.: My Linux system is now working almost perfectly, but in the next days I'll bore you with another pair of questions...
;) :Pengy:

cnjohnson 08-21-2003 10:26 AM

For logging out look at .bash_logout.

For shutdown or reboot read up about the inittab file, or the readme in /etc/init.d, or do a man init or man inittab for some clues.

Cheers--
Charles

Pres 08-21-2003 11:55 AM

or maybe /etc/rc.d/rc.6 if such a thing exists in redhat


All times are GMT -5. The time now is 05:19 AM.