mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
helpers2.1: when using ynh_systemctl to reload/start/restart a service with a wait_until and it timesout, handle it as a filure rather than keep going
This commit is contained in:
parent
9298738d06
commit
b3409729a6
1 changed files with 7 additions and 0 deletions
|
@ -162,6 +162,13 @@ ynh_systemctl() {
|
|||
ynh_print_warn "==="
|
||||
tail --lines=$length "$log_path" >&2
|
||||
fi
|
||||
|
||||
# If we tried to reload/start/restart the service but systemctl consider it to be still inactive/broken, then handle it as a failure
|
||||
if ([ "$action" == "reload" ] || [ "$action" == "start" ] || [ "$action" == "restart" ]) && ! systemctl --quiet is-active $service
|
||||
then
|
||||
_ynh_clean_check_starting
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
_ynh_clean_check_starting
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue