diff options
author | Britney Fransen <brfransen@gmail.com> | 2012-03-10 18:24:39 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2012-03-10 18:24:39 (GMT) |
commit | a923391ea01326947663693e8a1099fc8de5a3f3 (patch) | |
tree | ba11a274a0f1441a14d5d7f0c0c4c00dd49b5ecc /abs/core/runit-scripts/runitscripts/services/remotes/finish | |
parent | 42b8b3173f9d29f42b77b5a63336b3cb22a9852f (diff) | |
download | linhes_pkgbuild-a923391ea01326947663693e8a1099fc8de5a3f3.zip linhes_pkgbuild-a923391ea01326947663693e8a1099fc8de5a3f3.tar.gz linhes_pkgbuild-a923391ea01326947663693e8a1099fc8de5a3f3.tar.bz2 |
runit-scripts: add remotes service. refs #821
Diffstat (limited to 'abs/core/runit-scripts/runitscripts/services/remotes/finish')
-rwxr-xr-x | abs/core/runit-scripts/runitscripts/services/remotes/finish | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/abs/core/runit-scripts/runitscripts/services/remotes/finish b/abs/core/runit-scripts/runitscripts/services/remotes/finish new file mode 100755 index 0000000..ac04a33 --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/remotes/finish @@ -0,0 +1,21 @@ +#!/bin/bash +export TERM=linux +. /etc/rc.conf +. /etc/rc.d/functions +. /usr/MythVantage/bin/install_functions.sh + +killall -9 lircd 2>/dev/null +rm -f /var/run/lirc*.pid +[ -e /etc/sv/remotes/.runtime ] || mkdir -p /etc/sv/remotes/.runtime +touch /etc/sv/remotes/.runtime/`date +%s` +numfiles=`/usr/bin/file_time_offset.py -s4 -d/etc/sv/remotes/.runtime ` +if [ $numfiles -gt 3 ] +then + rm -f /etc/sv/remotes/.runtime/* 2>/dev/null + sv stop remotes + printhl " remotes is not able to start, disabling it" +fi + + + +in_kernel_support "enable" |