2017-11-21 18:18:06 +01:00
|
|
|
#!/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
|
2018-11-11 04:24:37 +01:00
|
|
|
echo "$SERVICE wasnt running so attempting restart"
|
2017-11-21 18:18:06 +01:00
|
|
|
fi
|
|
|
|
echo "$SERVICE is currently running"
|