Skip to content

Instantly share code, notes, and snippets.

@azbesthu
Created February 16, 2015 10:47
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/f4f864dafd7e34ec68e5 to your computer and use it in GitHub Desktop.
Save azbesthu/f4f864dafd7e34ec68e5 to your computer and use it in GitHub Desktop.
======= /etc/init.d/oscam =============
#! /bin/bash
# /etc/init.d/oscam
### BEGIN INIT INFO
# Provides: oscam
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Oscam servicies
# Description: Oscam servicies for tvheadend.
### END INIT INFO
start() {
/usr/local/bin/oscam -c /etc/oscam -b
}
stop() {
killall oscam
}
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