Zionetrix::Git
Repositories
Help
Report an Issue
wifidog-gateway-debian-package
Code
Commits
Branches
Tags
Search
Tree:
f08d105
Branches
Tags
master
wifidog-gateway-debian-package
wifidog-gateway.init
Release svn.r1461-2
Benjamin Renard
commited
f08d105
at 2012-01-10 12:49:31
wifidog-gateway.init
Blame
History
Raw
#!/bin/sh ### BEGIN INIT INFO # Provides: wifidog-gateway # Required-Start: $local_fs $remote_fs $network $syslog $named # Required-Stop: $local_fs $remote_fs $network $syslog $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # X-Interactive: true # Short-Description: Start/stop wifidog gateway daemon ### END INIT INFO DAEMON_BIN=/usr/bin/wifidog WDCTL_BIN=/usr/bin/wdctl DAEMON_DEFS=/etc/default/wifidog-gateway DAEMON_CONF=/etc/wifidog.conf LOG_LEVEL=6 OPTIONS="" NAME=wifidog-gateway DESC="Wifidog Gateway" [ -x "$DAEMON_BIN" ] || exit 0 [ -s "$DAEMON_DEFS" ] && . $DAEMON_DEFS [ ! -r "$DAEMON_CONF" ] && echo "Configuration file $DAEMON_CONF not present or unreadable" && exit 0 [ "$WIFIDOG_ENABLED" != "yes" ] && echo "$NAME disabled. see /etc/default/wifidog-gateway." && exit 0 DAEMON_OPTS="-c $DAEMON_CONF -s -d $LOG_LEVEL" . /lib/lsb/init-functions case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" start-stop-daemon --start --oknodo --quiet --exec "$DAEMON_BIN" -- $DAEMON_OPTS log_end_msg "$?" ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" start-stop-daemon --stop --oknodo --quiet --exec "$DAEMON_BIN" log_end_msg "$?" ;; restart|reload|force-reload) $0 stop sleep 2 $0 start ;; status) $WDCTL_BIN status exit $? ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload|reload|status}" >&2 exit 1 ;; esac exit 0