Merge branch 'feat/enable-reflector' into 'main'
feat: allow to enable reflector See merge request ydkn/docker-avahi!3
This commit is contained in:
commit
b1a620a9f0
1 changed files with 6 additions and 2 deletions
|
@ -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 "$@"
|
||||
|
|
Loading…
Reference in a new issue