Merge branch 'feat/enable-reflector' into 'main'

feat: allow to enable reflector

See merge request ydkn/docker-avahi!3
This commit is contained in:
Florian Schwab 2024-11-24 14:39:33 +00:00
commit b1a620a9f0

View file

@ -1,13 +1,17 @@
#!/bin/sh -e
if [ ! -z "${ALLOW_INTERFACES}" ]; then
if [ -n "${ALLOW_INTERFACES}" ]; then
sed -i "s/.*allow-interfaces=.*/allow-interfaces=${ALLOW_INTERFACES}/" /etc/avahi/avahi-daemon.conf
fi
if [ ! -z "${DENY_INTERFACES}" ]; then
if [ -n "${DENY_INTERFACES}" ]; then
sed -i "s/.*deny-interfaces=.*/deny-interfaces=${DENY_INTERFACES}/" /etc/avahi/avahi-daemon.conf
fi
if [ "${ENABLE_REFLECTOR}" = "yes" ]; then
sed -i "s/.*enable-reflector=.*/enable-reflector=yes/" /etc/avahi/avahi-daemon.conf
fi
rm -f /var/run/avahi-daemon/*
exec "$@"