Skip to content

Commit

Permalink
Added check for supported version of FreeRadius
Browse files Browse the repository at this point in the history
  • Loading branch information
oviserv committed May 24, 2021
1 parent f013a6e commit c364aab
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docker/radiusd/scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ chown root:radius start.sh config.sh sharedfunctions.sh && chmod 550 start.sh co
/bin/cp -a ${RADIUSDIR} /root/

# Patch configuration files
[ ! -d ${PATCHDIR} ] &&
echo "FreeRadius version ${FRVERSION} not supported" && exit 1

/usr/bin/patch -b ${RADIUSCONF} < ${PATCHDIR}/radiusd.conf.patch
/usr/bin/patch -b ${CHECKEAPTLS} < ${PATCHDIR}/check-eap-tls.patch
/usr/bin/patch -b ${DEFAULTSITE} < ${PATCHDIR}/default.patch
Expand Down
3 changes: 2 additions & 1 deletion docker/radiusd/scripts/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ SITESAVAILABLEDIR=${RADIUSDIR}/sites-available
SITESENABLEDDIR=${RADIUSDIR}/sites-enabled
BACKUPDIR=/backup
PROVISIONDIR=/provision
PATCHDIR=${SCRIPTDIR}/patches
FRVERSION=$(radiusd -v | grep -o -m 1 "3.0.2[1-9]")
PATCHDIR=${SCRIPTDIR}/patches/${FRVERSION}
CHECKEAPTLS=${SITESAVAILABLEDIR}/check-eap-tls
DEFAULTSITE=${SITESAVAILABLEDIR}/default
EAPMOD=${RADIUSDIR}/mods-available/eap
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ if [ "${ANSWER}" != "${ANSWER#[Yy]}" ] ;then
/usr/local/bin/docker-compose down --rmi all
/bin/rm -rf ./backup/*
/bin/rm -rf ./provision/*
/usr/bin/docker volume rm wifi_eap_tls_raddb
/usr/bin/docker volume rm wifi_eap-tls_raddb
fi

0 comments on commit c364aab

Please sign in to comment.