You are not logged in.

#1 2009-08-19 14:37:28

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

trigging a script to run on a system reboot or shutdown

Basically, I'd like to have a script run when I restart or shutdown the system (from the Gnome GUI, not from the shell).  Is there an equilivant to /etc/rc.local for shutdown?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2009-08-19 14:48:03

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: trigging a script to run on a system reboot or shutdown

oddly enough, it's called /etc/rc.local.shutdown

Offline

#3 2009-08-19 19:14:59

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: trigging a script to run on a system reboot or shutdown

Or you could create your own custom /etc/rc.d script. They run after /etc/rc.local.shutdown, so if you need to do something after your daemons have stopped, you'll need to do it this way, and arrange for that daemon to run last. (Putting it at the start of DAEMONS will make it run pretty late during shutdown, but it won't necessarily be the last daemon to run...daemons that don't appear in DAEMONS but were run by hand will be shut down last.)

Offline

#4 2009-08-19 20:30:41

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: trigging a script to run on a system reboot or shutdown

Very helpful, thanks guys!


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB