From 0b418a49e4eacc3499bb4f3a4eb796dc410143a7 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 10 Apr 2021 19:07:57 +0200 Subject: [PATCH] Apply example_ynh --- manifest.json | 48 ++++++++++++++++++++++++------------------------ scripts/upgrade | 9 ++++++--- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/manifest.json b/manifest.json index cb6446e2..59ff683a 100644 --- a/manifest.json +++ b/manifest.json @@ -1,30 +1,30 @@ { - "name": "Pixelfed", - "id": "pixelfed", - "packaging_format": 1, - "description": { - "en": "ActivityPub Federated Image Sharing", - "fr": "Logiciel de partage d'image fédéré via ActivityPub" - }, - "version": "0.10.10~ynh2", - "url": "https://pixelfed.org/", - "license": "AGPL-3.0-or-later", - "maintainer": [ - { - "name": "Jean-Baptiste Holcroft", - "email": "jean-baptiste@holcroft.fr" + "name": "Pixelfed", + "id": "pixelfed", + "packaging_format": 1, + "description": { + "en": "ActivityPub Federated Image Sharing", + "fr": "Logiciel de partage d'image fédéré via ActivityPub" }, - { - "name": "yalh76" - }, - { - "name": "lapineige" - } - ], - "requirements": { + "version": "0.10.10~ynh2", + "url": "https://pixelfed.org/", + "license": "AGPL-3.0-or-later", + "maintainer": [ + { + "name": "Jean-Baptiste Holcroft", + "email": "jean-baptiste@holcroft.fr" + }, + { + "name": "yalh76" + }, + { + "name": "lapineige" + } + ], + "requirements": { "yunohost": ">= 4.1.3" - }, - "multi_instance": true, + }, + "multi_instance": true, "services": [ "nginx", "php7.3-fpm" diff --git a/scripts/upgrade b/scripts/upgrade index 5d07e12e..409dc33d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -48,7 +48,7 @@ if ynh_legacy_permissions_exists; then fi #================================================= -# 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)..." @@ -185,12 +185,15 @@ chown -R "$app": "$final_path" ynh_exec_warn_less ynh_composer_exec --phpversion="$phpversion" --workdir="$final_path" --commands="update" #================================================= -# MODIFY A CONFIG FILE +# UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Modifying a config file..." +ynh_script_progression --message="Updating a config file..." ynh_add_config --template="../conf/.env" --destination="$final_path/.env" +chmod 400 "$final_path/.env" +chown $app:$app "$final_path/.env" + #================================================= # DEPLOYMENT #=================================================