mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
Use systemd is-active instead of systemd status
This commit is contained in:
parent
a73097649c
commit
0c75e06768
1 changed files with 1 additions and 4 deletions
|
@ -11,10 +11,7 @@ source ../settings/scripts/_common.sh
|
|||
# Source YunoHost helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
# retrieve useful param
|
||||
seafile_version=$(ynh_app_upstream_version)
|
||||
|
||||
if [[ ! "$(systemctl status seafile)" =~ "Active: inactive (dead)" ]] || [[ ! "$(systemctl status seahub)" =~ "Active: failed (Result: signal)" ]]; then
|
||||
if systemctl is-active seafile --quiet || systemctl is-active seahub --quiet; then
|
||||
ynh_print_warn --message="It's hightly recommended to make your backup when the service is stopped. Please stop seafile service and seahub service with this command before to run the backup 'systemctl stop seafile.service seahub.service'"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue