Ensure that a (potentially long) root script execute to completion before power-down
4465
Execute a script upon logout/reboot/shutdown in Ubuntu
52511
Best way to make a shutdown hook?
21270
How do I write a bash script to restart a process if it dies?
27714
How do I drop root privileges in shell scripts?
30341
Is there a windows app or simple scripting way to persuade windows to shutdown after a process ends?
157362
upstart scripts: run a task after networking goes up
51651
Why doesn't running "sudo shutdown now" shut down?
4423
How to write a script to sudo the last command
7117
How to automatically restart a linux background process if it fails?
72160
Why would a shutdown script NOT run?
122289
Re-run an application script when it crashes?
130622
How do I set up bash completion for command arguments?
153189
Windows 7 - How to run a script at shutdown but not at logoff
82577
How to stop a script from running if it's not root (and echo "Not running as root! Exiting...")
83438
Script to turn fast startup on/off
120004
How to set up a root cron job properly
27288
Possible to run scripts on sleep and wake?