From 71357ce26ac654307f2ebc8dba6b9dc22a59880f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 16 Aug 2021 09:20:33 +0200 Subject: [PATCH 1/3] fix --- manifest.json | 5 +++-- scripts/backup | 10 ++++------ scripts/install | 4 +++- scripts/restore | 4 ++-- scripts/upgrade | 1 - 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/manifest.json b/manifest.json index 7b385a5..45cafa5 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,8 @@ "id": "yunomonitor", "packaging_format": 1, "description": { - "en": "Home made tool to monitor automatically your servers." + "en": "Home made tool to monitor automatically your servers", + "fr": "Outil pour surveiller automatiquement vos serveurs" }, "version": "1.1.0~ynh1", "url": "https://github.com/zamentur/yunomonitor", @@ -14,7 +15,7 @@ "url": "https://reflexlibre.net" }, "requirements": { - "yunohost": ">= 3.6" + "yunohost": ">= 4.2.0" }, "multi_instance": true, "services": [ diff --git a/scripts/backup b/scripts/backup index cc652a5..5c0d111 100755 --- a/scripts/backup +++ b/scripts/backup @@ -20,7 +20,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --time --weight=1 +ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -28,20 +28,19 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) #================================================= -# STANDARD BACKUP STEPS +# DECLARE DATA AND CONF FILES TO BACKUP #================================================= +ynh_print_info --message="Declaring files to be backed up..." #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_script_progression --message="Backing up the main app directory..." --time --weight=1 ynh_backup --src_path="$final_path" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Backing up nginx web server configuration..." --time --weight=1 ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/000-$app.conf" @@ -50,7 +49,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/000-$app.conf" #================================================= # BACKUP SYSTEMD #================================================= -ynh_script_progression --message="Backing up systemd configuration..." --time --weight=1 ynh_backup --src_path="/etc/systemd/system/$app.service" @@ -64,4 +62,4 @@ ynh_backup --src_path="/etc/systemd/system/$app.timer" # END OF SCRIPT #================================================= -ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --time --last +ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/install b/scripts/install index 37c4b28..9cee96a 100755 --- a/scripts/install +++ b/scripts/install @@ -92,12 +92,14 @@ ynh_system_user_create --username=$app #================================================= # CONFIGURE SYSTEMD TIMER #================================================= + ynh_add_systemd_config cp ../conf/systemd.timer "/etc/systemd/system/$app.timer" ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="/etc/systemd/system/$app.timer" systemctl daemon-reload -systemctl enable $app.timer +systemctl enable $app.timer --quiet systemctl start $app.timer + #================================================= #================================================= diff --git a/scripts/restore b/scripts/restore index 2a2c359..645510d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -75,8 +75,8 @@ chmod u+x $final_path/yunomonitor.py ynh_script_progression --message="Activating systemd timer..." --weight=1 systemctl daemon-reload -systemctl enable $app.service -systemctl enable $app.timer +systemctl enable $app.service --quiet +systemctl enable $app.timer --quiet systemctl start $app.timer #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index e0b2288..baa2dfd 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -115,7 +115,6 @@ ynh_backup_if_checksum_is_different --file="$final_path/conf/$app.yml" # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum --file="$final_path/conf/$app.yml" - #================================================= # GENERIC FINALIZATION #================================================= From 98861c5709e9f00427de1c6fafacc327261d4283 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 16 Aug 2021 13:59:13 +0200 Subject: [PATCH 2/3] Yunomonitor doesn't support multiinstance --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index cabe4db..6c69fb0 100644 --- a/check_process +++ b/check_process @@ -13,6 +13,6 @@ setup_public=0 upgrade=1 backup_restore=1 - multi_instance=1 + multi_instance=0 port_already_use=0 change_url=0 From b773f6f6e84dff6a4cb796cb2b6dc0497e4f5f3e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 16 Aug 2021 13:59:33 +0200 Subject: [PATCH 3/3] Yunomonitor doesn't support multiinstance --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 45cafa5..3470992 100644 --- a/manifest.json +++ b/manifest.json @@ -17,7 +17,7 @@ "requirements": { "yunohost": ">= 4.2.0" }, - "multi_instance": true, + "multi_instance": false, "services": [ "nginx" ],