Browse Source

scan wifi devices earlier

HgO 1 year ago
parent
commit
5e89bf7d91
1 changed files with 3 additions and 3 deletions
  1. 3 3
      scripts/upgrade

+ 3 - 3
scripts/upgrade

@@ -194,6 +194,9 @@ ynh_install_app_dependencies $pkg_dependencies
 #=================================================
 ynh_script_progression --message="Copying configuration..."
 
+hot_reload_usb_wifi_cards
+wifi_device=$(iw_devices | awk -F\| '{ print $1 }')
+
 mkdir -pm 0755 /etc/hostapd/$app/
 chown root: /etc/hostapd/$app/
 
@@ -256,9 +259,6 @@ yunohost service add $service_name --description "Creates a Wi-Fi access point"
 #=================================================
 ynh_script_progression --message="Starting the hotspot service..."
 
-hot_reload_usb_wifi_cards
-wifi_device=$(iw_devices | awk -F\| '{ print $1 }')
-
 if [[ -z $wifi_device ]]; then
 	ynh_app_setting_set --app=$app --key=service_enabled --value=0
 	wifi_device=""