Skip to content

Instantly share code, notes, and snippets.

@bjoerns1983
Last active January 7, 2019 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerns1983/12b7ba24526c2e1c6663589c3dcc9ed7 to your computer and use it in GitHub Desktop.
Save bjoerns1983/12b7ba24526c2e1c6663589c3dcc9ed7 to your computer and use it in GitHub Desktop.
#!/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