diff --git a/check_process b/check_process index f4f5bb1..27e6a68 100644 --- a/check_process +++ b/check_process @@ -13,7 +13,7 @@ setup_private=1 setup_public=0 upgrade=1 - upgrade=1 from_commit=75f57d67acaa6cbe571a64aa77ec7ade8104c729 + upgrade=1 from_commit=546fd17712c7a9df428a4f26e7f8e4394884aaaf backup_restore=1 multi_instance=0 incorrect_path=1 @@ -30,3 +30,7 @@ Level 8=0 Level 9=0 Level 10=0 +;;; Upgrade options + ; commit=546fd17712c7a9df428a4f26e7f8e4394884aaaf + name=29 Jan 2019 + manifest_arg=domain=DOMAIN&path=PATH&wifi_ssid="myNeutralNetwork"&wifi_passphrase=PASSWORD&firmware_nonfree="no" \ No newline at end of file diff --git a/scripts/upgrade b/scripts/upgrade index 4adf079..579e9d9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -33,6 +33,21 @@ if [ -z $final_path ]; then ynh_app_setting_set $app final_path $final_path fi +if [ -d /var/www/wifiadmin/ ]; then + mv /var/www/wifiadmin $final_path + mv /etc/php/7.0/fpm/pool.d/wifiadmin.conf /etc/php/7.0/fpm/pool.d/$app.conf + ynh_replace_string "wifiadmin" "$app" /etc/php/7.0/fpm/pool.d/$app.conf + systemctl reload php7.0-fpm +fi + +if [ $firmware_nonfree = "yes" ]; then + firmware_nonfree=1 + ynh_app_setting_set $app firmware_nonfree $firmware_nonfree +elif [ $firmware_nonfree = "no" ]; then + firmware_nonfree=0 + ynh_app_setting_set $app firmware_nonfree $firmware_nonfree +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -122,7 +137,6 @@ ynh_print_info "Upgrading systemd configuration..." ynh_add_systemd_config $service_name # Make sure that the yunohost service has a description and need-lock enabled -yunohost service remove $service_name yunohost service add $service_name --description "Creates a Wi-Fi access point" --need_lock yunohost service start $service_name