diff --git a/templates/scripts/build.sh.j2 b/templates/scripts/build.sh.j2 index add1842..aa454f3 100644 --- a/templates/scripts/build.sh.j2 +++ b/templates/scripts/build.sh.j2 @@ -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 diff --git a/templates/scripts/dl-binary.sh.j2 b/templates/scripts/dl-binary.sh.j2 index 1d5763b..7fa1049 100644 --- a/templates/scripts/dl-binary.sh.j2 +++ b/templates/scripts/dl-binary.sh.j2 @@ -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