Difference between revisions of "Mythshutdown"
From MythTV Official Wiki
(Added link to Mythwelcome page, which documents mythshutdown better than this page) |
|||
Line 14: | Line 14: | ||
</pre>}} | </pre>}} | ||
+ | |||
+ | See, also, [[Mythwelcome]]. |
Revision as of 17:40, 1 November 2008
Incomplete, needs to be expanded. Please help to fill the gaps or discuss the issue on the talk page
Using mythshutdown to block shutdown
Mythshutdown can be used to block an automatic shutdown. Since 0.21 it is possible to call mythshutdown --lock for each script so that shutdown will remain blocked until the last script has terminated and called mythshutdown --unlock.
script.sh
#!/bin/bash # Unlock if the script is terminated for any reason trap "/usr/local/bin/mythshutdown --unlock" 0 SIGHUP SIGINT SIGQUIT SIGABRT SIGKILL SIGALRM SIGSEGV SIGTERM # Lock shutdown /usr/local/bin/mythshutdown --lock # Do script stuff
See, also, Mythwelcome.