From 028a7a5fe738f13ce02a1e64f5ce63dd65d8ac09 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 22 Nov 2016 14:17:51 +0200 Subject: [PATCH] workaround for weird issue on OpenVZ --- bin/v-update-firewall | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/v-update-firewall b/bin/v-update-firewall index 7babd84d..ccea7f3f 100755 --- a/bin/v-update-firewall +++ b/bin/v-update-firewall @@ -173,6 +173,14 @@ else fi fi +# Worarkound for OpenVZ +if [ -e "/proc/vz/veinfo" ]; then + dig @8.8.8.8 google.com +time=1 +tries=1 >/dev/null 2>&1 + if [ "$?" -ne 0 ]; then + $BIN/v-stop-firewall + fi +fi + #----------------------------------------------------------# # Vesta #