12 lines
278 B
Bash
Executable file
12 lines
278 B
Bash
Executable file
#!/usr/bin/env 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"
|