#! /bin/sh TIVOBEACON_BIN=/usr/local/bin/tivo_beacon test -x "$TIVOBEACON_BIN" || { echo "$TIVOBEACON_BIN not installed"; if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } . /etc/rc.status # Reset status of this service rc_reset case "$1" in start) echo -n "Starting TiVo Beacon " startproc -u nobody $TIVOBEACON_BIN rc_status -v ;; stop) echo -n "Shutting down TiVo Beacon " killproc -TERM $TIVOBEACON_BIN # Remember status and be verbose rc_status -v ;; try-restart|condrestart) if test "$1" = "condrestart"; then echo "${attn} Use try-restart ${done}" \ "(LSB)${attn} rather than condrestart" \ " ${warn}(RH)${norm}" fi $0 status if test $? = 0; then $0 restart else rc_reset # Not running is not a failure. fi # Remember status and be quiet rc_status ;; restart) $0 stop $0 start # Remember status and be quiet rc_status ;; force-reload) echo -n "Reload service TIVOBEACON " rc_status -v ## Otherwise: $0 restart rc_status ;; reload) ;; status) ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart}" exit 1 ;; esac rc_exit