systemctl-test
This commit is contained in:
parent
4d5a5fb86f
commit
244c0a4a2e
1 changed files with 12 additions and 0 deletions
12
systemctl-test.sh
Executable file
12
systemctl-test.sh
Executable file
|
@ -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"
|
Loading…
Reference in a new issue