summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts/runitscripts/services/remotes/finish
blob: c1a5554c5010cce3d87091ed1f00c49a8b2bfc8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
export TERM=linux
. /etc/rc.conf
. /etc/rc.d/functions
. /usr/MythVantage/bin/install_functions.sh

LOG=/tmp/remotes.log
echo "`date` --- finish started" >> $LOG

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 >> $LOG
	 printhl "    remotes is not able to start, disabling it"
     echo "    remotes is not able to start, disabling it" >> $LOG
fi


echo "Enable in kernel remote driver" >> $LOG
in_kernel_support "enable"