1

Added very dirty hack - openvpn.sh. It guessing openvpn client status.

This commit is contained in:
eleksir
2018-09-24 16:59:58 +03:00
parent a66337fa5d
commit 5adf8f5017

18
openvpn.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
LANG=C
LC_ALL=C
STAT=$(stat /tmp/openvpn-status.stat --format=%Y)
if [ $? -ge 1 ]; then
echo "DOWN"
fi
DATE=$(date +%s)
if [ $(($DATE - $STAT)) -gt 10 ]; then
echo "DOWN"
else
echo " UP "
fi