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