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
21 DESCRIPTION='Asinine IP over HTTP server'
22 if type -p authbind >/dev/null 2>&1; then AUTHBIND=authbind; fi
24 . /etc/default/hippotatd
26 test -f $DAEMON || exit 0
27 egrep '^[^ #]' $MASTER_CONFIG >/dev/null 2>&1 || exit 0
29 . /lib/lsb/init-functions
40 start-stop-daemon --start --quiet --user $USER --pidfile=$PIDFILE "$@"
45 pidfiledir=${PIDFILE%/*}
46 if test -d ${pidfiledir}; then return; fi
47 mkdir -m 755 $pidfiledir
48 chown $USER $pidfiledir
56 $AS_USER $DAEMON $HIPPOTATD_ARGS --print-config "$1"
60 vnetwork=$(print_config vnetwork)
61 if dump_firewall | fgrep " $vnetwork " >/dev/null; then :; else
63 "no entry in firewall for insecure vnetwork $vnetwork"
71 ssd --chuid $USER --startas \
72 $AUTHBIND $DAEMON --daemon --pidfile=$PIDFILE \
73 --syslog-facility=$LOGFACILITY $HIPPOTATD_ARGS
81 log_daemon_msg "Starting $DESCRIPTION" hippotatd
87 log_daemon_msg "Stopping $DESCRIPTION" hippotatd
93 log_daemon_msg "Restarting $DESCRIPTION" hippotatd
101 log_failure_msg "Cannot reload hippotat - need restart"
106 echo >&2 "$0: unknown action $1"