sps-extra · log · files · refs · tags · releases · people · languages · GitHub · file
net/avahi/files/sysvinit-avahi-daemon
#!/bin/sh
### BEGIN INIT INFO
# Provides: avahi-daemon
# Required-Start: $remote_fs dbus
# Required-Stop: $remote_fs dbus
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Avahi mDNS/DNS-SD daemon
### END INIT INFO
if [ -f /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
elif [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
fi
NAME=avahi-daemon
DAEMON="/usr/sbin/avahi-daemon"
DAEMON_ARGS="--no-chroot"
PIDFILE="/run/avahi-daemon.pid"
USER=""
start() {
start_daemon -p "$PIDFILE" ${USER:+-c "$USER"} "$DAEMON" $DAEMON_ARGS
}
stop() {
killproc -p "$PIDFILE" "$DAEMON"
}
status() {
pidofproc -p "$PIDFILE" "$DAEMON"
}
case $1 in
start) start ;;
stop) stop ;;
restart) stop; start ;;
status) status ;;
*) printf '%s\n' "Usage: $0 {start|stop|restart|status}" >&2; exit 1 ;;
esac