From 160d6bc756af644128deb0c87e2ded2c02cb9ace Mon Sep 17 00:00:00 2001 From: Josue-T Date: Mon, 8 Apr 2024 00:15:16 +0200 Subject: [PATCH] Update scripts/backup Co-authored-by: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> --- scripts/backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index 63b9526..e4675ac 100644 --- a/scripts/backup +++ b/scripts/backup @@ -14,7 +14,7 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -if [[ ! "$(systemctl status $app.service)" =~ "Active: inactive (dead)" ]]; then +if systemctl is-active $app.service --quiet; then ynh_print_warn --message="It's hightly recommended to make your backup when the service is stopped. Please stop $app service with this command before to run the backup 'systemctl stop $app.service'" fi