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
19 DESCRIPTION='Asinine IP over HTTP server'
21 . /etc/default/hippotatd
23 test -f $DAEMON || exit 0
24 egrep '^[^ #]' $MASTER_CONFIG >/dev/null 2>&1 || exit 0
26 . /lib/lsb/init-functions
30 start-stop-daemon --start --quiet --user $USER --pidfile=$PIDFILE "$@"
35 pidfiledir=${PIDFILE%/*}
36 if test -d ${pidfiledir}; then return; fi
37 mkdir -m 755 $pidfiledir
38 chown $USER $pidfiledir
43 ssd --chuid $USER --startas \
44 $DAEMON --daemon --pidfile=$PIDFILE \
45 --syslog-facility=$LOGFACILITY $HIPPOTATD_ARGS
53 log_daemon_msg "Starting $DESCRIPTION" hippotatd
59 log_daemon_msg "Stopping $DESCRIPTION" hippotatd
65 log_daemon_msg "Restarting $DESCRIPTION" hippotatd
73 log_failure_msg "Cannot reload hippotat - need restart"
78 echo >&2 "$0: unknown action $1"