diff --git a/scripts/install b/scripts/install index 1350852..df77f99 100644 --- a/scripts/install +++ b/scripts/install @@ -103,7 +103,7 @@ ynh_add_nginx_config # Create a dedicated systemd config ynh_add_systemd_config -ynh_replace_string "__NODEJS__" "$nodejs_use_version" "/etc/systemd/system/$app.service" +ynh_replace_string "__NODEJS__" "$nodejs_version" "/etc/systemd/system/$app.service" ynh_replace_string "__ENV_PATH__" "$PATH" "/etc/systemd/system/$app.service" ynh_replace_string "__NODE__" "$nodejs_path" "/etc/systemd/system/$app.service" systemctl daemon-reload diff --git a/scripts/upgrade b/scripts/upgrade index 7d79c80..20a1c90 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,7 +39,7 @@ port=$(ynh_app_setting_get "$app" port) if [ -f "/etc/yunohost/apps/$app/scripts/backup" ] ; then ynh_backup_before_upgrade # Backup the current version of the app ynh_clean_setup () { - ynh_backup_after_failed_upgrade + ynh_restore_upgradebackup } ynh_abort_if_errors # Stop script if an error is detected fi @@ -80,16 +80,16 @@ sudo chmod 755 $final_path -R # Modify Nginx configuration file and copy it to Nginx conf directory #================================================= -ynh_nginx_config +ynh_add_nginx_config #================================================= # ADD SYSTEMD SERVICE #================================================= ynh_replace_string "__NODE__" "$nodejs_path" "../conf/systemd.service" -ynh_replace_string "__NODEJS__" "$nodejs_use_version" "../conf/systemd.service" +ynh_replace_string "__NODEJS__" "$nodejs_version" "../conf/systemd.service" ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service" -ynh_systemd_config +ynh_add_systemd_config #=================================================