summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts/runitscripts/services/powermate/finish
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/runit-scripts/runitscripts/services/powermate/finish')
-rw-r--r--abs/core/runit-scripts/runitscripts/services/powermate/finish21
1 files changed, 21 insertions, 0 deletions
diff --git a/abs/core/runit-scripts/runitscripts/services/powermate/finish b/abs/core/runit-scripts/runitscripts/services/powermate/finish
new file mode 100644
index 0000000..b1d27fd
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/powermate/finish
@@ -0,0 +1,21 @@
+#!/bin/bash
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /usr/MythVantage/bin/install_functions.sh
+
+[ -e /etc/sv/powermate/.runtime ] || mkdir -p /etc/sv/powermate/.runtime
+touch /etc/sv/powermate/.runtime/`date +%s`
+numfiles=`/usr/bin/file_time_offset.py -s4 -d/etc/sv/powermate/.runtime `
+if [ $numfiles -gt 3 ]
+then
+ rm -f /etc/sv/powermate/.runtime/* 2>/dev/null
+ sv stop powermate
+ printhl " powermate is not able to start, disabling it"
+fi
+
+
+
+
+
+ in_kernel_support "enable"