1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/xwiki_ynh.git synced 2024-09-03 20:36:11 +02:00

Use systemd is-active instead of systemd status

This commit is contained in:
Josué Tille 2024-04-08 00:32:51 +02:00
parent c017074677
commit fd49fc543a
No known key found for this signature in database
GPG key ID: 5F259226AD51F2F5

View file

@ -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