From 035adcf13438d1043b73bb3190f6054aa0ce4d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 8 Apr 2024 00:26:39 +0200 Subject: [PATCH] Use systemd is-active instead of systemd status --- scripts/backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index 294d4ca..f55ce8a 100644 --- a/scripts/backup +++ b/scripts/backup @@ -9,7 +9,7 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -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