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