diff --git a/scripts/upgrade b/scripts/upgrade index 1a1f994..b70c7fb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,11 +16,12 @@ ynh_script_progression --message="Loading installation settings..." --time --wei app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -language=$(ynh_app_setting_get --app=$app --key=language) -admin=$(ynh_app_setting_get --app=$app --key=admin) final_path=$(ynh_app_setting_get --app=$app --key=final_path) +domain=$(ynh_app_setting_get --app=$app --key=domain) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +password=$(ynh_app_setting_get --app=$app --key=password) +admin=$(ynh_app_setting_get --app=$app --key=admin) +language=$(ynh_app_setting_get --app=$app --key=language) #================================================= # CHECK VERSION @@ -42,15 +43,6 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# STANDARD UPGRADE STEPS -#================================================= -# STOP SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Stopping a systemd service..." --time --weight=1 - -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" - #================================================= # CREATE DEDICATED USER #================================================= @@ -68,7 +60,7 @@ then ynh_script_progression --message="Upgrading source files..." --time --weight=1 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" + ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config.php" fi chmod 750 "$final_path" @@ -98,14 +90,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --time --w # Create a dedicated PHP-FPM config ynh_add_fpm_config -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Upgrading systemd configuration..." --time --weight=1 - -# Create a dedicated systemd config -ynh_add_systemd_config - #================================================= # GENERIC FINALIZATION #================================================= @@ -116,7 +100,6 @@ ynh_script_progression --message="Upgrading logrotate configuration..." --time - # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append -#================================================= # RELOAD NGINX #================================================= ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1