Set default interface value if undefined

This commit is contained in:
billz
2025-05-02 23:49:31 -07:00
parent 219c40b6fd
commit ef073ef6ec

View File

@@ -43,9 +43,14 @@ if [ -r "$CONFIGFILE" ]; then
fi fi
# Set interface from config if not set by parameter # Set interface from config if not set by parameter
if [ -z "$interface" ] && [ -n "${config[WifiInterface]}" ]; then if [ -z "$interface" ]; then
interface="${config[WifiInterface]}" if [ -n "${config[WifiInterface]}" ]; then
echo "Interface not provided. Using interface from config: $interface" 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 fi
echo "Stopping network services..." echo "Stopping network services..."