#!/bin/sh DAEMON=avahi DAEMON_BIN=avahi-daemon PID_FILE=/var/run/avahi-daemon/pid . /etc/init.d/modlibrc start() { modlib_startdaemon $DAEMON_BIN -D } case $1 in ""|load) modlib_add_user_and_group nobody if [ ! -d /tmp/flash/avahi ]; then mkdir -p /tmp/flash/avahi cp -a /etc/config-template.avahi/* /tmp/flash/avahi/ fi modreg daemon $DAEMON modlib_start $AVAHI_ENABLED ;; unload) modunreg daemon $DAEMON modlib_stop ;; start) start ;; stop) modlib_stop ;; restart) modlib_restart ;; status) modlib_status ;; *) echo "Usage: $0 [start|stop|restart|load|unload|status]" 1>&2 exit 1 ;; esac exit 0