diff --git a/check_process b/check_process index 2bffd5c..b287317 100644 --- a/check_process +++ b/check_process @@ -22,7 +22,7 @@ upgrade=1 #upgrade=1 from_commit=CommitHash backup_restore=1 - multi_instance=1 + multi_instance=0 port_already_use=0 change_url=1 ;;; Options diff --git a/manifest.json b/manifest.json index 9f36da4..be46e07 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Helps designers organize and document participatory workshops.", "fr": "Aide les designers a organiser et documenter des ateliers participatifs." }, - "version": "1.0~ynh1", + "version": "2.0.0b~ynh1", "url": "https://plateau.latelier-des-chercheurs.fr/", "upstream": { "license": "AGPL-3.0-or-later", diff --git a/scripts/change_url b/scripts/change_url index ad08adb..7d05853 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -28,6 +28,7 @@ ynh_script_progression --message="Loading installation settings..." # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) +port=$(ynh_app_setting_get --app=$port --key=port) #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP diff --git a/scripts/restore b/scripts/restore index 9b2f80a..da07214 100755 --- a/scripts/restore +++ b/scripts/restore @@ -43,6 +43,13 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -90,13 +97,14 @@ chown -R $app:www-data "$datadir" #================================================= # SPECIFIC RESTORATION #================================================= - #================================================= -# RESTORE THE NGINX CONFIGURATION +# REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." +ynh_script_progression --message="Reinstalling dependencies..." --weight=7 -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +# Define and install dependencies +ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version +ynh_use_nodejs #================================================= # RESTORE VARIOUS FILES @@ -104,6 +112,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_script_progression --message="Restoring various files..." ynh_add_config --template="../conf/settings_base.json" --destination="$final_path/settings_base.json" +chmod 600 "$final_path/settings_base.json" #================================================= # RESTORE SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index fdc852a..55dfc94 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,6 +19,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) +port=$(ynh_app_setting_get --app=$port --key=port) #================================================= # CHECK VERSION @@ -88,16 +89,6 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -if ! ynh_permission_exists --permission="admin"; then - # Create the required permissions - ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin -fi - -# Create a permission if needed -if ! ynh_permission_exists --permission="api"; then - ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" -fi - #================================================= # CREATE DEDICATED USER #=================================================