6 # Authors: <sebastien.estienne@gmail.com>
9 . /lib/lsb/init-functions
13 PATH=/sbin:/bin:/usr/sbin:/usr/bin
14 DESC="Avahi ZeroConf daemon"
18 PIDFILE=$PIDDIR/$NAME.pid
19 DAEMONUSER=@AVAHI_USER@
20 DAEMONGRP=@AVAHI_GROUP@
24 # Gracefully exit if the package has been removed.
25 test -x $DAEMON || exit 0
28 # Function that starts the daemon/service.
31 if [ ! -d $PIDDIR ]; then
34 chown -R $DAEMONUSER:$DAEMONGRP $PIDDIR
36 start-stop-daemon --start \
37 --background --chuid $DAEMONUSER \
38 -m --pidfile $PIDFILE \
39 --exec $DAEMON -- $DAEMON_OPTS
44 # Function that stops the daemon/service.
47 start-stop-daemon --stop --oknodo --quiet --pidfile $PIDFILE \
55 log_begin_msg "Starting $DESC: $NAME"
60 log_begin_msg "Stopping $DESC: $NAME"
65 log_begin_msg "Restarting $DESC: $NAME"
72 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2