mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Manage case of service already stopped
This commit is contained in:
parent
af567c6f85
commit
19d2901d46
1 changed files with 6 additions and 0 deletions
|
@ -88,6 +88,12 @@ ynh_systemd_action() {
|
|||
log_path="${log_path:-/var/log/$service_name/$service_name.log}"
|
||||
timeout=${timeout:-300}
|
||||
|
||||
# Manage case of service already stopped
|
||||
if [ "$action" == "stop" ] && ! systemctl is-active --quiet $service_name
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Start to read the log
|
||||
if [[ -n "$line_match" ]]
|
||||
then
|
||||
|
|
Loading…
Add table
Reference in a new issue