--- file_not_specified_in_diff +++ file_not_specified_in_diff @@ -37,0 +37,1 @@ + COMPLETELYUP=`false` @@ -41,0 +42,15 @@ + + CONNECTIONTESTS=0 + while [ ${COMPLETELYUP} -gt 0 ] && [ ${CONNECTIONTESTS -lt 5 ]; do + if [ -f ${VPN}/onlinecheck ]; then + ping -c 3 `head -n 1 ${VPN}/onlinecheck` >& /dev/null + COMPLETELYUP=$? + CONNECTIONTESTS=`expr ${CONNECTIONTEST} + 1` + else + COMPLETELYUP=`true` + fi + done + if [ ${COMPLETELYUP} -gt 0 ]; then + ewarn "Openvpn started without problems but the host in" + ewarn "${VPN}/onlinecheck is unavailable." + fi