# Avahi daemon

case "$1" in
    start)
        # Enabled if the registry key isn't present or it contains a 1.
        case "`registry networking avahi_server`" in
            ""|"1")
                avahi-daemon -D
                ;;
            *)
                echo Avahi daemon disabled
                ;;
        esac

        ;;
    stop)
        # Always stop it in case the registry was changed since boot
        avahi-daemon -c && avahi-daemon -k
        ;;
esac
