From ad35d095245afdb6a442bd1d5a05df99b3367375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 2 Jun 2024 09:53:51 +0200 Subject: [PATCH] cleaning --- manifest.toml | 5 ++++- scripts/backup | 6 +----- scripts/change_url | 2 +- scripts/install | 2 +- scripts/upgrade | 18 ++++-------------- 5 files changed, 11 insertions(+), 22 deletions(-) diff --git a/manifest.toml b/manifest.toml index ad23f0a..509769e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ description.fr = "Plateforme de commentaires rapide axée sur la confidentialit version = "1.8.7~ynh2" -maintainers = ["eric_G"] +maintainers = [] [upstream] license = "MIT" @@ -20,8 +20,11 @@ code = "https://github.com/souramoo/commentoplusplus" yunohost = ">= 11.2" architectures = ["amd64"] multi_instance = true + ldap = false + sso = false + disk = "50M" ram.build = "150M" ram.runtime = "50M" diff --git a/scripts/backup b/scripts/backup index 59c90ce..8f5471e 100755 --- a/scripts/backup +++ b/scripts/backup @@ -22,15 +22,11 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/change_url b/scripts/change_url index 7495ce8..86bbcf5 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -31,7 +31,7 @@ ynh_change_url_nginx_config ynh_script_progression --message="Adding a configuration file..." --weight=1 domain="$new_domain" -ynh_add_config --template="../conf/.env" --destination="$install_dir/commento.env" +ynh_add_config --template=".env" --destination="$install_dir/commento.env" chmod 400 "$install_dir/commento.env" chown $app:$app "$install_dir/commento.env" diff --git a/scripts/install b/scripts/install index 6505545..3038722 100755 --- a/scripts/install +++ b/scripts/install @@ -45,7 +45,7 @@ yunohost service add $app --description="Privacy-focused commenting platform" -- #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/.env" --destination="$install_dir/commento.env" +ynh_add_config --template=".env" --destination="$install_dir/commento.env" chmod 400 "$install_dir/commento.env" chown $app:$app "$install_dir/commento.env" diff --git a/scripts/upgrade b/scripts/upgrade index 5cc3870..1ecf73b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -37,14 +31,10 @@ fi #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=1 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=1 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" #--keep="commento.env" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" #--keep="commento.env" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -67,7 +57,7 @@ yunohost service add $app --description="Privacy-focused commenting platform" -- #================================================= ynh_script_progression --message="Updating a configuration file..." --weight=1 -ynh_add_config --template="../conf/.env" --destination="$install_dir/commento.env" +ynh_add_config --template=".env" --destination="$install_dir/commento.env" chmod 400 "$install_dir/commento.env" chown $app:$app "$install_dir/commento.env"