diff --git a/manifest.json b/manifest.json index 5cf64d8..6a521f0 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Collaborative editor to work on notes written in Markdown", "fr": "Éditeur collaboratif pour travailler sur des notes en Markdown" }, - "version": "1.7.2~ynh1", + "version": "1.7.2~ynh2", "url": "https://github.com/hedgedoc/hedgedoc", "license": "AGPL-3.0-only", "maintainer": { diff --git a/scripts/install b/scripts/install index adf1fc6..b855aaa 100644 --- a/scripts/install +++ b/scripts/install @@ -147,13 +147,15 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil ynh_store_file_checksum --file="$final_path/config.json" -cp ../conf/.sequelizerc.example "$final_path/.sequelizerc" +# cp ../conf/.sequelizerc.example "$final_path/.sequelizerc" # # DB Config File -ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/.sequelizerc" -ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/.sequelizerc" +# ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/.sequelizerc" +# ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/.sequelizerc" -ynh_store_file_checksum --file="$final_path/.sequelizerc" +# ynh_store_file_checksum --file="$final_path/.sequelizerc" + +ynh_add_config --template="../conf/.sequelizerc.example" --destination="$final_path/.sequelizerc" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index e5dd990..21d73d2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -31,6 +31,18 @@ ynh_script_progression --message="Checking version..." --weight=2 upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 + +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -52,7 +64,7 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=$app --action=stop --log_path="systemd" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE