From 07c4bb90bc91caa24fe3cc80094ec36a58a3555b Mon Sep 17 00:00:00 2001 From: kjeld Schouten-Lebbing Date: Tue, 6 Jul 2021 23:16:01 +0200 Subject: [PATCH] some entrypoint tweaks --- containers/apps/freeradius/entrypoint.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/containers/apps/freeradius/entrypoint.sh b/containers/apps/freeradius/entrypoint.sh index 6c4a6db3e06..71df7d636ef 100644 --- a/containers/apps/freeradius/entrypoint.sh +++ b/containers/apps/freeradius/entrypoint.sh @@ -1,11 +1,16 @@ #!/bin/sh set -e -if [ -f "/etc/raddb/clients.conf" ]; then +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..." - cp -Rf /defaults/raddb/* /etc/raddb/ + 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 # this if will check if the first argument is a flag