Merge pull request #1843 from RaspAP/fix/servicestart-default

Fix: Set default interface value if undefined
This commit is contained in:
Bill Zimmerman
2025-05-03 17:15:32 +02:00
committed by GitHub

View File

@@ -43,9 +43,14 @@ if [ -r "$CONFIGFILE" ]; then
fi
# Set interface from config if not set by parameter
if [ -z "$interface" ] && [ -n "${config[WifiInterface]}" ]; then
interface="${config[WifiInterface]}"
echo "Interface not provided. Using interface from config: $interface"
if [ -z "$interface" ]; then
if [ -n "${config[WifiInterface]}" ]; then
interface="${config[WifiInterface]}"
echo "Interface not provided. Using interface from config: $interface"
else
interface="wlan0"
echo "Interface not provided and not found in config. Defaulting to: $interface"
fi
fi
echo "Stopping network services..."