diff --git a/scripts/backup b/scripts/backup index 7189d8c..a032119 100644 --- a/scripts/backup +++ b/scripts/backup @@ -27,12 +27,6 @@ ynh_backup --src_path="$install_dir" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index e3323df..81e429b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,10 +17,11 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 email=$(ynh_user_get_info --username=$admin --key=mail) #================================================= -# CHECK VERSION +# UPGRADE DEPENDENCIES #================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=6 -upgrade_type=$(ynh_check_app_version_changed) +ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= # STANDARD UPGRADE STEPS @@ -34,16 +35,12 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=1 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=1 - - ynh_setup_source --dest_dir="$install_dir" #--keep="config/config.js" +ynh_setup_source --dest_dir="$install_dir" #--keep="config/config.js" - chmod -R o-rwx "$install_dir" - chown -R $app:$app "$install_dir" -fi +chmod -R o-rwx "$install_dir" +chown -R $app:$app "$install_dir" #================================================= # APPLY FOLDER GROUP RIGHTS FOR WWW-DATA @@ -79,13 +76,6 @@ if ! [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then fi fi -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=6 - -ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version - #================================================= # NGINX CONFIGURATION #=================================================