initscript: use authbind
[hippotat] / debian / hippotat.init
index c0e4d7e..51495e9 100644 (file)
@@ -17,6 +17,7 @@ PIDFILE=/var/run/hippotat/hippotatd.pid
 LOGFACILITY=daemon
 # HIPPOTATD_ARGS
 DESCRIPTION='Asinine IP over HTTP server'
+if type -p authbind >/dev/null 2>&1; then AUTHBIND=authbind; fi
 
 . /etc/default/hippotatd
 
@@ -40,8 +41,8 @@ ensure_dirs () {
 
 do_start () {
        ensure_dirs
-       ssd     --chuid $USER --startas \
-               $DAEMON --daemon --pidfile=$PIDFILE \
+       ssd     --chuid $USER --startas                         \
+               $AUTHBIND $DAEMON --daemon --pidfile=$PIDFILE   \
                --syslog-facility=$LOGFACILITY $HIPPOTATD_ARGS
 }
 do_stop () {