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
/hippotatd
14 MASTER_CONFIG
=/etc
/hippotat
/master.cfg
16 PIDFILE
=/var
/run
/hippotat
/hippotatd.pid
21 DESCRIPTION
='Asinine IP over HTTP server'
22 if type authbind
>/dev
/null
2>&1; then AUTHBIND
=authbind
; fi
24 test -e
/etc
/default
/hippotatd
&&
25 .
/etc
/default
/hippotatd
29 test -f
$DAEMON ||
exit 0
30 egrep '^[^ #]' $MASTER_CONFIG >/dev
/null
2>&1 ||
exit 0
32 .
/lib
/lsb
/init-functions
43 start-stop-daemon
--quiet
--user
$USER --pidfile
=$PIDFILE "$@"
48 pidfiledir
=${PIDFILE%/*}
49 if test -d
${pidfiledir}; then return; fi
50 mkdir
-m
755 $pidfiledir
51 chown
$USER $pidfiledir
59 $AS_USER $DAEMON $HIPPOTATD_ARGS --print-config
"$1"
63 vnetwork
=$
(print_config vnetwork
)
64 if dump_firewall | fgrep
" $vnetwork " >/dev
/null
; then :; else
66 "no entry in firewall for insecure vnetwork $vnetwork"
74 ssd
--chuid
$USER --start \
75 --startas
/bin
/sh
-- -ec
'"$@"' x \
76 $AUTHBIND $DAEMON --daemon
--pidfile
=$PIDFILE \
77 --syslog-facility
=$LOGFACILITY $HIPPOTATD_ARGS
80 ssd
--stop
--oknodo
--retry
5
85 log_daemon_msg
"Starting $DESCRIPTION" hippotatd
92 log_daemon_msg
"Stopping $DESCRIPTION" hippotatd
99 log_daemon_msg
"Restarting $DESCRIPTION" hippotatd
107 log_failure_msg
"Cannot reload hippotat - need restart"
112 echo >&2 "$0: unknown action $1"