Browse Source

Merge pull request #67 from labriqueinternet/no_device_defined

No device defined
Alexandre Aubin 4 years ago
parent
commit
01c5115b20
1 changed files with 11 additions and 0 deletions
  1. 11 0
      conf/ynh-hotspot

+ 11 - 0
conf/ynh-hotspot

@@ -331,6 +331,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
 
@@ -482,6 +488,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