#!/bin/sh # # chkconfig: 2345 99 01 ### BEGIN INIT INFO # Provides: Netdisco Daemon # Required-Start: 99 # Required-Stop: 1 # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: # Description: Netdisco Daemon Service ### END INIT INFO` binary=/home/netdisco/perl5/bin/netdisco-daemon case "$1" in start) /bin/su - netdisco -c "$binary start" ;; stop) /bin/su - netdisco -c "$binary stop" ;; status) # status $binary /bin/su - netdisco -c "$binary status" ;; restart) /bin/su - netdisco -c "$binary stop" /bin/su - netdisco -c "$binary start" ;; *) echo $"Usage: $prog {start|stop|restart|status|help}" RETVAL=2 esac