summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts/runitscripts/services/powermate/finish
blob: b1d27fd4f608a44e7acd9fb65f724e31a7077c30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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"