5 # Required-Start: $syslog $network userv
6 # Required-Stop: $syslog $network
7 # Default-Start: 2 3 4 5
9 # Short-Description: hippotatd
10 # Description: Asinine IP over HTTP server
13 DAEMON=/usr/sbin/hippotat
14 MASTER_CONFIG=/etc/hippotat/master.cfg
16 PIDFILE=/var/run/hippotat/hippotatd.pid
20 . /etc/default/hippotatd
22 test -f $DAEMON || exit 0
23 egrep '^[^ #]' $MASTER_CONFIG >/dev/null || exit 0
25 . /lib/lsb/init-functions
29 start-stop-daemon --start --quiet --user $USER --pidfile=$PIDFILE "$@"
34 pidfiledir=${PIDFILE%/*}
35 if test -d ${pidfiledir}; then return; fi
36 mkdir -m 755 $pidfiledir
37 chown $USER $pidfiledir
42 ssd --chuid $USER --startas \
43 $DAEMON --daemon --pidfile=$PIDFILE \
44 --syslog-facility=$LOGFACILITY $HIPPOTATD_ARGS
52 log_daemon_msg "Starting IP over HTTP server" hippotatd
58 log_daemon_msg "Stopping IP over HTTP server" hippotatd
64 log_daemon_msg "Restarting IP over HTTP server" hippotatd
72 log_failure_msg "Cannot reload hippotat - need restart"
77 echo >&2 "$0: unknown action $1"