From 3471d211d894d9654561605ce78ad10abd723e52 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Wed, 28 Nov 2018 21:16:36 +0100 Subject: [PATCH 1/2] Testing (#16) * [fix] Check process * [fix] Timers are not supported by yunohost * [fix] No yuno service to remove * [fix] Don't fail on missing yuno service --- manifest.json | 2 +- scripts/remove | 5 ++--- scripts/upgrade | 9 ++++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/manifest.json b/manifest.json index 6ce468a..2072a73 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Backup your server with borg.", "fr": "Sauvegarder votre serveur avec borg." }, - "version": "1.0.2", + "version": "1.0.3", "url": "https://borgbackup.readthedocs.io", "license": "BSD-3-Clause", "maintainer": { diff --git a/scripts/remove b/scripts/remove index fefc270..d001268 100755 --- a/scripts/remove +++ b/scripts/remove @@ -28,9 +28,8 @@ ynh_remove_backports #================================================= # REMOVE FILES #================================================= -yunohost service stop $app.timer -yunohost service disable $app.timer -yunohost service remove $app.timer +systemctl stop $app.timer +systemctl disable $app.timer ynh_remove_systemd_config ynh_secure_remove "/etc/systemd/system/$app.timer" ynh_secure_remove "/usr/local/bin/backup-with-$app" diff --git a/scripts/upgrade b/scripts/upgrade index ea436f8..2a1e5fa 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -33,6 +33,9 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -yunohost service remove $app.timer -systemctl enable $app.timer -systemctl start $app.timer + +if grep "borg.timer" /etc/yunohost/services.yml > /dev/null ; then + yunohost service remove $app.timer + systemctl enable $app.timer + systemctl start $app.timer +fi \ No newline at end of file From 8c573b566dfa6c25a4b422f9d5d28fba7ac9683b Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Mon, 18 Feb 2019 23:08:10 +0100 Subject: [PATCH 2/2] [fix] Use na instead of 1 in check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 9443473..84a56da 100644 --- a/check_process +++ b/check_process @@ -24,7 +24,7 @@ Level 1=auto Level 2=auto Level 3=auto - Level 4=1 + Level 4=na Level 5=auto Level 6=auto Level 7=auto