5 # Required-Start: $syslog $network $local_fs userv
6 # Required-Stop: $syslog $network $local_fs
7 # Default-Start: 2 3 4 5
9 # Short-Description: hippotatd
10 # Description: Asinine IP over HTTP server
13 E: hippotat-server: init.d-script-sourcing-without-test etc/init.d/hippotatd:25 /etc/default/hippotatd
14 E: hippotat-client: missing-dependency-on-libc needed by usr/bin/hippotat
15 E: hippotat-server: missing-dependency-on-libc needed by usr/sbin/hippotatd
17 DAEMON=/usr/sbin/hippotatd
18 MAIN_CONFIG=/etc/hippotat/main.cfg
20 PIDFILE=/var/run/hippotat/hippotatd.pid
25 DESCRIPTION='Asinine IP over HTTP server'
26 if type authbind >/dev/null 2>&1; then AUTHBIND=authbind; fi
28 test -e /etc/default/hippotatd && . /etc/default/hippotatd
32 test -f $DAEMON || exit 0
33 egrep '^[^ #]' $MAIN_CONFIG >/dev/null 2>&1 || exit 0
35 . /lib/lsb/init-functions
46 start-stop-daemon --quiet --user $USER --pidfile=$PIDFILE "$@"
51 pidfiledir=${PIDFILE%/*}
52 if test -d ${pidfiledir}; then return; fi
53 mkdir -m 755 $pidfiledir
54 chown $USER $pidfiledir
62 $AS_USER $DAEMON $HIPPOTATD_ARGS --print-config "$1"
66 vnetwork=$(print_config vnetwork)
67 if dump_firewall | fgrep " $vnetwork " >/dev/null; then :; else
69 "no entry in firewall for insecure vnetwork $vnetwork"
77 ssd --chuid $USER --start \
78 --startas /bin/sh -- -ec '"$@"' x \
79 $AUTHBIND $DAEMON --daemon --pidfile=$PIDFILE \
80 --syslog-facility=$LOGFACILITY $HIPPOTATD_ARGS
83 ssd --stop --oknodo --retry 5
88 log_daemon_msg "Starting $DESCRIPTION" hippotatd
95 log_daemon_msg "Stopping $DESCRIPTION" hippotatd
101 restart|force-reload)
102 log_daemon_msg "Restarting $DESCRIPTION" hippotatd
110 log_failure_msg "Cannot reload hippotat - need restart"
115 echo >&2 "$0: unknown action $1"