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

Fix the upgrade from an old commit

This commit is contained in:
Kayou 2019-03-10 23:39:25 +01:00
parent 31f30fac54
commit f7c255a9cf
No known key found for this signature in database
GPG key ID: 823A2CBE071D3126
2 changed files with 20 additions and 2 deletions

View file

@ -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"

View file

@ -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