feat: allow to enable reflector

This commit is contained in:
Florian Schwab 2024-11-24 15:14:25 +01:00
parent fdee331f41
commit dbc6b62a2f

View file

@ -1,13 +1,17 @@
#!/bin/sh -e #!/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 sed -i "s/.*allow-interfaces=.*/allow-interfaces=${ALLOW_INTERFACES}/" /etc/avahi/avahi-daemon.conf
fi 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 sed -i "s/.*deny-interfaces=.*/deny-interfaces=${DENY_INTERFACES}/" /etc/avahi/avahi-daemon.conf
fi 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/* rm -f /var/run/avahi-daemon/*
exec "$@" exec "$@"