1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hotspot_ynh.git synced 2024-09-03 19:25:53 +02:00

Various fixes @_@

This commit is contained in:
Alexandre Aubin 2021-10-18 01:39:24 +02:00
parent e2d7a00861
commit eef16c74c4
3 changed files with 40 additions and 37 deletions

View file

@ -8,6 +8,11 @@ name = "Configuration"
optional = false optional = false
[main.service.no_antenna] [main.service.no_antenna]
# The value is filled via a custom getter
type = "boolean"
visible = "false"
[main.service.no_antenna_alert]
ask = "No wifi antenna has been detected! If you use a wifi USB dongle and that this one is not listed here, try to unplug and replug it, then reload this page." ask = "No wifi antenna has been detected! If you use a wifi USB dongle and that this one is not listed here, try to unplug and replug it, then reload this page."
type = "alert" type = "alert"
style = "danger" style = "danger"

View file

@ -31,11 +31,7 @@ get__no_antenna() {
then then
echo "value: false" echo "value: false"
else else
cat << EOF echo "value: true"
value: false
ask: Wifi antenna correctly detected
style: info
EOF
fi fi
} }
@ -92,6 +88,8 @@ EOF
echo " $device: $device" echo " $device: $device"
done done
fi fi
echo "value: '$(ynh_app_setting_get $app wifi_device)'"
} }
get__array_settings() { get__array_settings() {

View file

@ -45,7 +45,7 @@ ynh_abort_if_errors
#================================================= #=================================================
# STOP SYSTEMD SERVICE # STOP SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression --message="Stopping a systemd service..." ynh_script_progression --message="Stopping the hotspot service ... (this may take some time)"
ynh_systemd_action --service_name=$service_name --action="stop" --log_path=systemd #--line_match="Started YunoHost Wifi Hotspot" ynh_systemd_action --service_name=$service_name --action="stop" --log_path=systemd #--line_match="Started YunoHost Wifi Hotspot"
@ -160,7 +160,7 @@ yunohost service add $service_name --description "Creates a Wi-Fi access point"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." ynh_script_progression --message="Starting the hotspot service..."
hot_reload_usb_wifi_cards hot_reload_usb_wifi_cards
wifi_device=$(iw_devices | awk -F\| '{ print $1 }') wifi_device=$(iw_devices | awk -F\| '{ print $1 }')