From fd49fc543a5bdfa88c53326322b20d7dd7a92d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 8 Apr 2024 00:32:51 +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 6fef85d..de2e1ea 100755 --- a/scripts/backup +++ b/scripts/backup @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_print_info --message="Declaring files to be backed up..." -if [[ ! "$(systemctl status $app)" =~ "Active: inactive (dead)" ]]; then +if systemctl is-active $app --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