From MythTV Official Wiki
Revision as of 14:38, 11 July 2012 by Pvr4me (talk | contribs) (Update help output)

Jump to: navigation, search

Incomplete.png 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 from each script so that shutdown will remain blocked until the last script has terminated and called mythshutdown --unlock.

# Unlock if the script is terminated for any reason

# Lock shutdown
/usr/local/bin/mythshutdown --lock

# Do script stuff

The full command-line options are (taken from version 0.25.1 output):

Script.png mythshutdown --help
Misc. Options:
-c OR --check                 Check whether shutdown is possible
--lock                        disable shutdown
-x OR --safeshutdown          Check if shutdown is possible, and shutdown
-t OR --setscheduledwakeup    Set wakeup time to the next scheduled recording
-w OR --setwakeup             Set the wakeup time (yyyy-MM-ddThh:mm:ss)
-h OR --help OR --usage       Display this help printout, or give detailed information of selected option.
--version                     Display version information.
--shutdown                    Apply wakeup time to nvram and shutdown.
-p OR --startup               Check startup status
-s OR --status                check current status
-u OR --unlock                enable shutdown

Logging Options:
--loglevel                    Set the logging level.  All log messages at lower levels will be discarded.
                              In descending order: emerg, alert, crit, err, warning, notice, info, debug
                              defaults to info
--logpath                     Writes logging messages to a file in the directory logpath with filenames in the format:
                              This is typically used in combination with --daemon, and if used in combination with --pidfile, this can be used with log rotators, using the HUP call to inform MythTV to reload the file
--nodblog                     Disable database logging.
-q OR --quiet                 Don't log to the console (-q).  Don't log anywhere (-q -q)
--syslog                      Set the syslog logging facility.
                              Set to "none" to disable, defaults to none.
-v OR --verbose               Specify log filtering. Use '-v help' for level info.

See, also, Mythwelcome.