small entrypoint mistakes

This commit is contained in:
kjeld Schouten-Lebbing
2021-07-06 23:34:41 +02:00
parent b725eea05d
commit bb91f1f97d
+3 -4
View File
@@ -1,17 +1,16 @@
#!/bin/sh #!/bin/sh
set -e set -e
rm -Rf /etc/raddb
if [ -f "/config/clients.conf" ]; then if [ -f "/config/clients.conf" ]; then
echo "Radius config already exists, skipping config copy..." echo "Radius config already exists, skipping config copy..."
chown -R freerad:freerad /config
ln -s /etc/raddb /config
else else
echo "Radius config does not exist, copying..." echo "Radius config does not exist, copying..."
rm -Rf /defaults/raddb
cp -Rf /defaults/raddb/* /config/ cp -Rf /defaults/raddb/* /config/
fi
chown -R freerad:freerad /config chown -R freerad:freerad /config
ln -s /etc/raddb /config ln -s /etc/raddb /config
fi
# this if will check if the first argument is a flag # this if will check if the first argument is a flag
# but only works if all arguments require a hyphenated flag # but only works if all arguments require a hyphenated flag