Add more checl-scripts
This commit is contained in:
13
check_vpn.sh
Executable file
13
check_vpn.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
||||
if ! ps ax | grep openvpn | grep -v grep > /dev/null ; then
|
||||
echo -e "\n\tOpenVPN is not running. so i'm going to (re)start the vpn service..\n"
|
||||
/etc/init.d/openvpn stop
|
||||
kill -9 `cat /var/run/openvpn.server.pid 2>/dev/null` > /dev/null 2>&1
|
||||
rm -f /var/run/openvpn.server.pid
|
||||
/etc/init.d/openvpn start
|
||||
fi
|
||||
|
||||
exit 0;
|
||||
Reference in New Issue
Block a user