summaryrefslogtreecommitdiffstats
path: root/test/units/testsuite-11.sh
blob: 708c7cebb7dea6458206fb8dbbd3543c958b07a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env bash
set -x

systemctl start fail-on-restart.service
active_state=$(systemctl show --value --property ActiveState fail-on-restart.service)
while [[ "$active_state" == "activating" || "$active_state" == "active" ]]; do
    sleep 1
    active_state=$(systemctl show --value --property ActiveState fail-on-restart.service)
done
systemctl is-failed fail-on-restart.service || exit 1
touch /testok