some entrypoint tweaks

This commit is contained in:
kjeld Schouten-Lebbing 2021-07-06 23:16:01 +02:00
parent f799ad2612
commit 07c4bb90bc
No known key found for this signature in database
GPG Key ID: 4CDAD4A532BC1EDB
1 changed files with 8 additions and 3 deletions

View File

@ -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