5 systemctl
--no-block start fail-on-restart.service
6 active_state
=$
(systemctl show
--value --property ActiveState fail-on-restart.service
)
7 while [[ "$active_state" == "activating" ||
"$active_state" == "active" ]]; do
9 active_state
=$
(systemctl show
--value --property ActiveState fail-on-restart.service
)
11 systemctl is-failed fail-on-restart.service ||
exit 1