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'
20 if type -p authbind >/dev/null 2>&1; then AUTHBIND=authbind; fi
22 . /etc/default/hippotatd
24 test -f $DAEMON || exit 0
25 egrep '^[^ #]' $MASTER_CONFIG >/dev/null 2>&1 || exit 0
27 . /lib/lsb/init-functions
31 start-stop-daemon --start --quiet --user $USER --pidfile=$PIDFILE "$@"
36 pidfiledir=${PIDFILE%/*}
37 if test -d ${pidfiledir}; then return; fi
38 mkdir -m 755 $pidfiledir
39 chown $USER $pidfiledir
44 ssd --chuid $USER --startas \
45 $AUTHBIND $DAEMON --daemon --pidfile=$PIDFILE \
46 --syslog-facility=$LOGFACILITY $HIPPOTATD_ARGS
54 log_daemon_msg "Starting $DESCRIPTION" hippotatd
60 log_daemon_msg "Stopping $DESCRIPTION" hippotatd
66 log_daemon_msg "Restarting $DESCRIPTION" hippotatd
74 log_failure_msg "Cannot reload hippotat - need restart"
79 echo >&2 "$0: unknown action $1"