diff --git a/systemctl-test.sh b/systemctl-test.sh new file mode 100755 index 0000000..f5c4ad1 --- /dev/null +++ b/systemctl-test.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -ex + +# The service we want to check (according to systemctl) +SERVICE=openvpn-client@client.service + +if [ "`systemctl is-active $SERVICE`" != "active" ] +then + echo "$SERVICE wasnt running so attempting restart" +fi +echo "$SERVICE is currently running"