From ae6f3266d5c44c891b2ad919635dd6409cd4a564 Mon Sep 17 00:00:00 2001 From: ljf Date: Wed, 28 Nov 2018 21:08:45 +0100 Subject: [PATCH] [fix] Don't fail on missing yuno service --- manifest.json | 2 +- scripts/upgrade | 8 +++++--- 2 files changed, 6 insertions(+), 4 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/upgrade b/scripts/upgrade index ea436f8..c8411ec 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -33,6 +33,8 @@ 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