Skip to content

Instantly share code, notes, and snippets.

@azbesthu
Created December 2, 2013 11:06
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 azbesthu/7748025 to your computer and use it in GitHub Desktop.
Save azbesthu/7748025 to your computer and use it in GitHub Desktop.
#! /bin/bash
# /etc/init.d/tvheadend
### BEGIN INIT INFO
# Provides: tvheadend
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: TvHeadend servicies
# Description: TvHeadend servicies for streaming.
### END INIT INFO
start() {
/usr/local/bin/tvheadend -f -u pi -g pi
}
stop() {
killall tvheadend
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment