contrib/arpon/arpon

39 lines
844 B
Plaintext
Raw Normal View History

2015-11-30 01:30:16 +01:00
#!/bin/sh
2009-01-31 00:04:54 +01:00
#
2015-11-30 01:30:16 +01:00
# /etc/rc.d/arpon: start/stop arpon daemon
2009-01-31 00:04:54 +01:00
#
2015-11-30 01:30:16 +01:00
SSD=/sbin/start-stop-daemon
PROG=/usr/sbin/arpon
PID=/var/run/arpon.pid
OPTS="-gqD 1>>/var/log/arpon.log"
2009-01-31 00:04:54 +01:00
case $1 in
start)
2015-11-30 01:30:16 +01:00
$SSD --start --pidfile $PID --exec $PROG -- $OPTS
;;
2009-01-31 00:04:54 +01:00
stop)
2015-11-30 01:30:16 +01:00
$SSD --stop --remove-pidfile --retry 10 --pidfile $PID
;;
2009-01-31 00:04:54 +01:00
restart)
2015-11-30 01:30:16 +01:00
$0 stop
$0 start
;;
reload)
$SSD --stop --signal HUP --pidfile $PID
;;
status)
$SSD --status --pidfile $PID
case $? in
0) echo "$PROG is running" ;;
1) echo "$PROG is not running but the pid file $PID exists" ;;
3) echo "$PROG is not running" ;;
4) echo "Unable to determine the program status" ;;
esac
;;
2009-01-31 00:04:54 +01:00
*)
2015-11-30 01:30:16 +01:00
echo "usage: $0 [start|stop|restart|reload|status]"
;;
2009-01-31 00:04:54 +01:00
esac
2015-11-30 01:30:16 +01:00
# End of file