mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
avahi: run as daemon, enable optional debug, remove startup hacks
This commit is contained in:
parent
448068621c
commit
5abdd364ba
@ -27,23 +27,20 @@
|
||||
# ensure that environment is sane
|
||||
. /etc/profile
|
||||
|
||||
# wait for network
|
||||
wait_for_inet_addr force
|
||||
|
||||
progress "Starting Avahi Daemon"
|
||||
|
||||
if [ "$DEBUG" = "yes" ]; then
|
||||
AVAHI_DEBUG="--debug"
|
||||
fi
|
||||
|
||||
mkdir -p /var/run/avahi-daemon
|
||||
while true; do
|
||||
AVAHI_ENABLED=true
|
||||
if [ -f $CONFIG_CACHE/services/avahi.conf ]; then
|
||||
. $CONFIG_CACHE/services/avahi.conf
|
||||
fi
|
||||
if [ "$AVAHI_ENABLED" == "true" ]; then
|
||||
wait_for_dbus
|
||||
avahi-daemon --syslog > /dev/null 2>&1
|
||||
else
|
||||
break
|
||||
rm /var/run/avahi-daemon/pid &>/dev/null
|
||||
avahi-daemon $AVAHI_DEBUG -D --syslog > /dev/null 2>&1
|
||||
fi
|
||||
usleep 2000000
|
||||
done
|
||||
)&
|
||||
|
Loading…
x
Reference in New Issue
Block a user