diff options
Diffstat (limited to 'abs/core/runit-scripts/runitscripts/services/evrouter')
-rwxr-xr-x | abs/core/runit-scripts/runitscripts/services/evrouter/finish | 10 | ||||
-rwxr-xr-x | abs/core/runit-scripts/runitscripts/services/evrouter/run | 20 |
2 files changed, 30 insertions, 0 deletions
diff --git a/abs/core/runit-scripts/runitscripts/services/evrouter/finish b/abs/core/runit-scripts/runitscripts/services/evrouter/finish new file mode 100755 index 0000000..5ebda4c --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/evrouter/finish @@ -0,0 +1,10 @@ +#!/bin/bash +. /etc/profile +which evrouter >/dev/null 2>/dev/null +if [ $? = 0 ] +then + DISPLAY=localhost:50 evrouter -q + rm -rf /tmp/.evrouter* +else + sv down evrouter +fi
\ No newline at end of file diff --git a/abs/core/runit-scripts/runitscripts/services/evrouter/run b/abs/core/runit-scripts/runitscripts/services/evrouter/run new file mode 100755 index 0000000..56f7ae6 --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/evrouter/run @@ -0,0 +1,20 @@ +#!/bin/bash +. /etc/profile +export TERM=linux +. /etc/rc.conf +. /etc/rc.d/functions + +which evrouter >/dev/null 2>/dev/null +if [ $? = 0 ] +then + + stat_runit "Starting evrouter" + ps -ef |grep -v grep|grep -q "Xvfb :50" + if [ ! $? = 0 ] + then + sv start Xvfb + fi + + su mythtv -c "DISPLAY=localhost:50 evrouter -c /etc/evrouter.cfg -f /dev/input/event*" +fi + |