update: use is-enabled not is-active before restart
Otherwise we do not restart services that have stopped due to an issue. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
019b2d269d
commit
8f20340103
|
@ -76,7 +76,7 @@ fi
|
|||
|
||||
{% if beacon_node_update_restarts_service %}
|
||||
# Avoid faiure on first Ansible run due to missing service.
|
||||
if [[ $(systemctl is-active "${SERVICE}" || true) == "inactive" ]]; then
|
||||
if [[ $(systemctl is-enabled "${SERVICE}" || true) != "enabled" ]]; then
|
||||
echo " !!! No service to restart!"
|
||||
exit
|
||||
else
|
||||
|
|
|
@ -64,7 +64,7 @@ fi
|
|||
|
||||
{% if beacon_node_update_restarts_service %}
|
||||
# Avoid faiure on first Ansible run due to missing service.
|
||||
if [[ $(systemctl is-active "${SERVICE}" || true) == "inactive" ]]; then
|
||||
if [[ $(systemctl is-enabled "${SERVICE}" || true) != "enabled" ]]; then
|
||||
echo " !!! No service to restart!"
|
||||
exit
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue