summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/linhes-scripts/mythwelcome-config.py
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2010-04-11 08:12:45 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2010-04-11 08:12:45 (GMT)
commit5c0afa9648c9a5ba228c2694c97cfbf0ebf3856a (patch)
tree439d149b1ddbe612a32ef0b1baf8c214fea25a7d /abs/core-testing/linhes-scripts/mythwelcome-config.py
parenta890cdaf65cc0dbccc39ef0117674b92f12d967f (diff)
parent4b1471f0ad5c2eb188240c740fea7f35c19f81fa (diff)
downloadlinhes_pkgbuild-5c0afa9648c9a5ba228c2694c97cfbf0ebf3856a.zip
linhes_pkgbuild-5c0afa9648c9a5ba228c2694c97cfbf0ebf3856a.tar.gz
linhes_pkgbuild-5c0afa9648c9a5ba228c2694c97cfbf0ebf3856a.tar.bz2
Merge branch 'HEAD' of ssh://cesman@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/core-testing/linhes-scripts/mythwelcome-config.py')
-rwxr-xr-xabs/core-testing/linhes-scripts/mythwelcome-config.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/abs/core-testing/linhes-scripts/mythwelcome-config.py b/abs/core-testing/linhes-scripts/mythwelcome-config.py
new file mode 100755
index 0000000..c7bf10b
--- /dev/null
+++ b/abs/core-testing/linhes-scripts/mythwelcome-config.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+
+# This script will configure the myth db to allow MythWelcome to wake and shutdown the system.
+
+from socket import gethostname
+from MythTV import MythDB
+mythdb = MythDB()
+localhostname = gethostname()
+
+# mythwelcome --setup
+mythdb.settings[localhostname].MythShutdownNvramCmd = u'sudo sh -c \"/usr/LH/bin/mythwelcome-set-alarm.sh $time\"'
+mythdb.settings[localhostname].MythShutdownWakeupTimeFmt = u'time_t'
+mythdb.settings[localhostname].MythShutdownNvramRestartCmd = u''
+mythdb.settings[localhostname].MythShutdownReboot = u'sudo /sbin/reboot'
+mythdb.settings[localhostname].MythShutdownPowerOff = u'sudo /sbin/poweroff'
+mythdb.settings[localhostname].MythShutdownXTermCmd = u'xterm'
+mythdb.settings[localhostname].MythWelcomeStartFECmd = u'/usr/LH/bin/mythfrontend-start'
+
+
+# mythtv-setup Shutdown/Wakeup options
+if mythdb.settings[localhostname].idleTimeoutSecs == u'0':
+ mythdb.settings[localhostname].idleTimeoutSecs = u'40'
+
+mythdb.settings.NULL.WakeupTimeFormat = u'yyyy-MM-ddThh:mm:ss'
+mythdb.settings.NULL.SetWakeuptimeCommand = u'/usr/bin/mythshutdown --setwakeup $time'
+mythdb.settings.NULL.ServerHaltCommand = u'/usr/bin/mythshutdown --shutdown'
+mythdb.settings.NULL.preSDWUCheckCommand = u'/usr/bin/mythshutdown --check'