From b6ba4307162bc6a200f655536631f511c5f62c40 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 24 Sep 2020 00:07:43 +0200 Subject: [PATCH] No need to go further if no wifi device defined --- conf/ynh-hotspot | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/conf/ynh-hotspot b/conf/ynh-hotspot index b3b2a9a..66af079 100644 --- a/conf/ynh-hotspot +++ b/conf/ynh-hotspot @@ -337,6 +337,12 @@ case "$1" in elif [ "${ynh_service_enabled}" != "enabled" ]; then echo "Disabled service" else + + if [ -z "${ynh_wifi_device}" ]; then + echo "[ERR] No wifi device selected. Make sure your wifi antenna is plugged-in / available and select it in the Hotspot admin" + exitcode=1 + fi + echo "[hotspot] Starting..." touch /tmp/.ynh-hotspot-started @@ -488,6 +494,11 @@ case "$1" in exitcode=1 fi + if [ -z "${ynh_wifi_device}" ]; then + echo "[ERR] No wifi device selected. Make sure your wifi antenna is plugged-in / available and select it in the Hotspot admin" + exitcode=1 + fi + echo "[INFO] Autodetected internet interface: ${new_internet_device} (last start: ${old_internet_device})" if is_nat_set "${new_internet_device}"; then