scripts/secours/check-vpn-from-crans
Michel Blockelet 7477b505ac Solution temporaire pour le VPN
Solution temporaire, le temps que le VPN soit "bien" reinstalle sur ovh ...

darcs-hash:20080222110825-ddb99-b7f181d9d6a552a3ba39d75d9f5918176a741f5e.gz
2008-02-22 12:08:25 +01:00

18 lines
459 B
Bash
Executable file

#!/bin/bash
VPN_NAME=ovh
PID_FILE=/var/run/openvpn.${VPN_NAME}.pid
exit 0
if [[ ! -f $PID_FILE || ! -d /proc/$(< $PID_FILE) ]] && ! fping -q ovh.adm.crans.org; then
if fping -q ovh.crans.org; then
if /etc/init.d/openvpn start ${VPN_NAME} > /dev/null; then
echo 'Lancement du tunnel vers OVH reussi !'
exit 0
else
echo 'Echec du lancement du tunnel vers OVH !'
exit 1
fi
fi
fi