shairport-sync/docker/etc/s6-overlay/s6-rc.d/03-avahi/data/check

11 lines
275 B
Bash
Executable File

#!/bin/sh
state="$(dbus-send --system --dest=org.freedesktop.Avahi --print-reply / org.freedesktop.Avahi.Server.GetState | grep int32 | awk '{printf $2}')"
# Avahi will return 'state=2' when 'Server startup complete'
if [ "$state" = 2 ]; then
exit 0
else
exit 1
fi