small entrypoint mistakes

This commit is contained in:
kjeld Schouten-Lebbing 2021-07-06 23:34:41 +02:00
parent b725eea05d
commit bb91f1f97d
No known key found for this signature in database
GPG Key ID: 4CDAD4A532BC1EDB
1 changed files with 4 additions and 5 deletions

View File

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