diff --git a/containers/apps/freeradius/entrypoint.sh b/containers/apps/freeradius/entrypoint.sh index 71df7d636ef..af89ba40ad0 100644 --- a/containers/apps/freeradius/entrypoint.sh +++ b/containers/apps/freeradius/entrypoint.sh @@ -1,18 +1,17 @@ #!/bin/sh set -e +rm -Rf /etc/raddb if [ -f "/config/clients.conf" ]; then echo "Radius config already exists, skipping config copy..." - chown -R freerad:freerad /config - ln -s /etc/raddb /config else echo "Radius config does not exist, copying..." - rm -Rf /defaults/raddb cp -Rf /defaults/raddb/* /config/ - chown -R freerad:freerad /config - ln -s /etc/raddb /config fi +chown -R freerad:freerad /config +ln -s /etc/raddb /config + # this if will check if the first argument is a flag # but only works if all arguments require a hyphenated flag # -v; -SL; -f arg; etc will work, but not arg1 arg2