From 6ab0e85152731b2a0209e58016404cb605814921 Mon Sep 17 00:00:00 2001 From: Britney Fransen Date: Tue, 6 Apr 2010 15:40:00 -0500 Subject: linhes-scripts: Add mythwelcome-config.py script --- abs/core-testing/linhes-scripts/PKGBUILD | 32 +++++++++++++++++++++- .../linhes-scripts/mythwelcome-config.py | 27 ++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100755 abs/core-testing/linhes-scripts/mythwelcome-config.py diff --git a/abs/core-testing/linhes-scripts/PKGBUILD b/abs/core-testing/linhes-scripts/PKGBUILD index a9d6f5b..6c9c085 100644 --- a/abs/core-testing/linhes-scripts/PKGBUILD +++ b/abs/core-testing/linhes-scripts/PKGBUILD @@ -3,7 +3,7 @@ pkgname=linhes-scripts pkgver=1 -pkgrel=64 +pkgrel=65 pkgdesc="Various scripts that help to make LinHES, LinHES." arch=('i686' 'x86_64') license=('GPL2') @@ -24,6 +24,7 @@ pause-mythcommflag.sh myth2x264 770-wrapper.sh mythwelcome-set-alarm.sh +mythwelcome-config.py pause_mythcommflag limit-mythcommflag.sh vdpau-detector @@ -80,3 +81,32 @@ md5sums=('f56985b2d602e11dc1e10d3e7848b2a5' 'd7c7914225ec86bf3ea46104a364f977' '25c1baeb97a49656456ae33f7e7a9f06' '2fb25aef03ffd1282414d8cca3df7056') +md5sums=('f56985b2d602e11dc1e10d3e7848b2a5' + '623b6e9ba6cc4a19771005e750f337a7' + '9ae2cd7a0c42d57ad8b5f515d7d60196' + '1274bad3fb7296f00acd2d44804bad14' + 'b4f858834ea92418208ab496ca39ad32' + '6b6e7d34a4bda6d608d150039adefd07' + '3fe554dbbf7d09e1f9925032ba888bf5' + '18263972b6326e140bbef0bb7dfa2da9' + '410795ef9039e4c6c0484e706ecfd567' + '0750d7c65109d12aa536f312a38410d1' + 'ac2a4a6b4100f4d7bfb9ecd9356c8c6e' + 'd2b475821f902c5e081e7da43a35e6ac' + '95c092f67036a361ef7a57436f44332e' + 'a87e7394bfb3fcc5c2419a2f9ae9b9aa' + '3b776bbff68906ddc2f62b7e0dde3fe4' + '15f3143d2b1369da431e4268029aba40' + '3d0adf26280cde55a0c47188fff34826' + '93aaa2940e33ec9ebb305b839ac46a3e' + '27a8b3680f3c631a582064fd26ab8746' + 'b527b01d119d3bc33b8fa69bdf1082bb' + 'c537c44156d8404016cc4b405b092d45' + '4e66f302a77f1a857476e7f289d0c157' + 'be324dba44ae96676973a74421944853' + 'c9dc0dd07369622879a000247ac55074' + '65629302a4d2c3adf88cdf0ebc10d493' + 'ea5492d4dab8271db20cb84416c001dc' + 'd7c7914225ec86bf3ea46104a364f977' + '25c1baeb97a49656456ae33f7e7a9f06' + '2fb25aef03ffd1282414d8cca3df7056') 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' -- cgit v0.12