Last active
January 7, 2019 19:23
-
-
Save bjoerns1983/12b7ba24526c2e1c6663589c3dcc9ed7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dvb_stop() { | |
echo -n "Stop DVB Subsystem" | |
/usr/bin/docker stop Tvheadend-Stable | |
/sbin/modprobe -r ddbridge cxd2099 | |
} | |
dvb_start() { | |
echo -n "Start DVB Subsystem" | |
/sbin/modprobe ddbridge cxd2099 | |
while [ ! -d "/dev/dvb" ]; do | |
# Sleep until file does exists/is created | |
sleep 1 | |
done | |
sleep 5 | |
chown -R nobody:users /dev/dvb | |
/usr/bin/docker start Tvheadend-Stable | |
} | |
case "$1" in | |
'start') | |
dvb_start | |
;; | |
'stop') | |
dvb_stop | |
;; | |
*) | |
echo "usage $0 start|stop" | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment