Some radius fixes
This commit is contained in:
@@ -24,4 +24,4 @@ sources:
|
|||||||
- https://hub.docker.com/r/freeradius/freeradius-server/
|
- https://hub.docker.com/r/freeradius/freeradius-server/
|
||||||
- https://freeradius.org/
|
- https://freeradius.org/
|
||||||
type: application
|
type: application
|
||||||
version: 1.7.12
|
version: 1.7.13
|
||||||
|
|||||||
@@ -558,6 +558,10 @@ questions:
|
|||||||
enum:
|
enum:
|
||||||
- value: "pvc"
|
- value: "pvc"
|
||||||
description: "pvc"
|
description: "pvc"
|
||||||
|
- value: "emptyDir"
|
||||||
|
description: "emptyDir"
|
||||||
|
- value: "hostPath"
|
||||||
|
description: "hostPath"
|
||||||
- variable: storageClass
|
- variable: storageClass
|
||||||
label: "(Advanced) storageClass"
|
label: "(Advanced) storageClass"
|
||||||
description: " Warning: Anything other than SCALE-ZFS will break rollback!"
|
description: " Warning: Anything other than SCALE-ZFS will break rollback!"
|
||||||
@@ -611,7 +615,7 @@ questions:
|
|||||||
description: "Path inside the container the storage is mounted"
|
description: "Path inside the container the storage is mounted"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
default: "/config"
|
default: "/etc/raddb"
|
||||||
hidden: true
|
hidden: true
|
||||||
- variable: medium
|
- variable: medium
|
||||||
label: "EmptyDir Medium"
|
label: "EmptyDir Medium"
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ env: {}
|
|||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
enabled: true
|
enabled: true
|
||||||
mountPath: "/config"
|
mountPath: "/etc/raddb"
|
||||||
type: pvc
|
type: pvc
|
||||||
accessMode: ReadWriteOnce
|
accessMode: ReadWriteOnce
|
||||||
size: "100Gi"
|
size: "100Gi"
|
||||||
|
|||||||
@@ -4,14 +4,13 @@ ARG VERSION
|
|||||||
FROM freeradius/freeradius-server:${VERSION}
|
FROM freeradius/freeradius-server:${VERSION}
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
VOLUME /config
|
|
||||||
|
|
||||||
# hadolint ignore=DL3008,DL3015,SC2086,SC2155
|
# hadolint ignore=DL3008,DL3015,SC2086,SC2155
|
||||||
RUN \
|
RUN \
|
||||||
rm /docker-entrypoint.sh && \
|
rm /docker-entrypoint.sh && \
|
||||||
rm -Rf /etc/raddb
|
rm -Rf /etc/raddb
|
||||||
|
|
||||||
|
VOLUME /etc/raddb
|
||||||
COPY ./containers/apps/freeradius/entrypoint.sh /docker-entrypoint.sh
|
COPY ./containers/apps/freeradius/entrypoint.sh /docker-entrypoint.sh
|
||||||
|
|
||||||
LABEL "maintainer"="TrueCharts <info@truecharts.org>"
|
LABEL "maintainer"="TrueCharts <info@truecharts.org>"
|
||||||
|
|||||||
@@ -1,32 +1,32 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ -f "/config/clients.conf" ]; then
|
if [ -f "/etc/raddb/clients.conf" ]; then
|
||||||
echo "Radius config already exists, skipping config copy..."
|
echo "Radius config already exists, skipping config copy..."
|
||||||
else
|
else
|
||||||
echo "Radius config does not exist, copying..."
|
echo "Radius config does not exist, copying..."
|
||||||
cp -Rf /etc/freeradius/* /config/
|
cp -Rf /etc/freeradius/* /etc/raddb/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chown -R freerad:freerad /config
|
chown -R freerad:freerad /etc/raddb/
|
||||||
|
|
||||||
# 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
|
||||||
# -v; -SL; -f arg; etc will work, but not arg1 arg2
|
# -v; -SL; -f arg; etc will work, but not arg1 arg2
|
||||||
if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then
|
if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then
|
||||||
set -- freeradius -d /config "$@"
|
set -- freeradius "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check for the expected command
|
# check for the expected command
|
||||||
if [ "$1" = 'freeradius' ]; then
|
if [ "$1" = 'freeradius' ]; then
|
||||||
shift
|
shift
|
||||||
exec freeradius -f -d /config "$@"
|
exec freeradius -f "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# many people are likely to call "radiusd" as well, so allow that
|
# many people are likely to call "radiusd" as well, so allow that
|
||||||
if [ "$1" = 'radiusd' ]; then
|
if [ "$1" = 'radiusd' ]; then
|
||||||
shift
|
shift
|
||||||
exec freeradius -f -d /config "$@"
|
exec freeradius -f "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# else default to run whatever the user wanted like "bash" or "sh"
|
# else default to run whatever the user wanted like "bash" or "sh"
|
||||||
|
|||||||
Reference in New Issue
Block a user