From 19acfac5471dfc002a3bf7be1c9934e6a27e5bf3 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 10 Apr 2021 18:58:51 +0200 Subject: [PATCH] Apply example_ynh --- manifest.json | 4 ---- scripts/install | 8 +++----- scripts/remove | 2 +- scripts/restore | 3 +++ scripts/upgrade | 2 +- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/manifest.json b/manifest.json index ca266de..4255f93 100644 --- a/manifest.json +++ b/manifest.json @@ -44,10 +44,6 @@ { "name": "password", "type": "password", - "ask": { - "en": "Set the administrator password", - "fr": "Définissez le mot de passe administrateur" - }, "example": "Choose a password" }, { diff --git a/scripts/install b/scripts/install index 1f4d515..fd38d02 100755 --- a/scripts/install +++ b/scripts/install @@ -236,14 +236,12 @@ pushd $final_path/$app su "$app" -s $SHELL -lc "$final_path/$app/bin/pleroma_ctl user new $admin $admin_email --password $password --moderator --admin -y" popd -#================================================= -# STORE THE CONFIG FILE CHECKSUM -#================================================= -ynh_script_progression --message="Storing the config file checksum..." - # Calculate and store the config file checksum into the app settings ynh_store_file_checksum --file="$config" +chmod 400 "$config" +chown $app:$app "$config" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/remove b/scripts/remove index 3408bba..35443da 100755 --- a/scripts/remove +++ b/scripts/remove @@ -59,7 +59,7 @@ ynh_remove_systemd_config ynh_script_progression --message="Removing the PostgreSQL database..." # Remove a database if it exists, along with the associated user -ynh_psql_remove_db --db_user="$db_user" --db_name="$db_name" +ynh_psql_remove_db --db_user=$db_user --db_name=$db_name #================================================= # REMOVE DEPENDENCIES diff --git a/scripts/restore b/scripts/restore index 6968802..8949aa1 100755 --- a/scripts/restore +++ b/scripts/restore @@ -107,6 +107,9 @@ ynh_script_progression --message="Restoring the config file..." ynh_restore_file --origin_path="/etc/$app/config.exs" +chmod 400 "/etc/$app/config.exs" +chown $app:$app "/etc/$app/config.exs" + #================================================= # REINSTALL DEPENDENCIES #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 6e71462..a34e10c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -95,7 +95,7 @@ abort_if_up_to_date previous_version="${version}" #================================================= -# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= ynh_script_progression --message="Backing up the app before upgrading (may take a while)..."