Fix - community theme_click-to-continue-legacy for newer releases of openNDS

Signed-off-by: Rob White <rob@blue-wave.net>
This commit is contained in:
Rob White
2024-09-18 10:34:00 +01:00
parent 63f4937e00
commit 8a8a875916

View File

@@ -40,13 +40,31 @@ click_to_continue() {
if [ -e "$legacy" ]; then
cp $legacy $legacysplash
get_option_from_config gatewayport
if [ -z "$gatewayport"]; then
gatewayport="2050"
fi
sedstr="s|\$gatewayname|$gatewayname|"
sed -i "$sedstr" "$legacysplash"
authaction="/opennds_auth/"
htmlentitydecode $gatewayurl
gatewayurl=$entitydecoded
authaction="$gatewayurl/opennds_auth/"
sedstr="s|\$authaction|$authaction|"
sed -i "$sedstr" "$legacysplash"
css_rel="\"/splash.css\""
css_abs="\"$gatewayurl/splash.css\""
sedstr="s|$css_rel|$css_abs|"
sed -i "$sedstr" "$legacysplash"
img_rel="\"/images/splash.jpg\""
img_abs="\"$gatewayurl/images/splash.jpg\""
sedstr="s|$img_rel|$img_abs|"
sed -i "$sedstr" "$legacysplash"
option="gatewayfqdn"
get_option_from_config