From e527e52c70f7e966210e0108de516cf744d16ea6 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 20 Oct 2020 08:31:12 +0000 Subject: [PATCH] Less errors in logs --- glorytun-tcp-post.sh | 2 +- glorytun-udp-post.sh | 2 +- omr-service | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/glorytun-tcp-post.sh b/glorytun-tcp-post.sh index 240599c..e993b04 100644 --- a/glorytun-tcp-post.sh +++ b/glorytun-tcp-post.sh @@ -5,7 +5,7 @@ INTF=gt-${DEV} [ -z "$LOCALIP" ] && LOCALIP="10.255.255.1" [ -z "$BROADCASTIP" ] && BROADCASTIP="10.255.255.3" -while [ -z "$(ip link show $INTF)" ]; do +while [ -z "$(ip link show $INTF 2>/dev/null)" ]; do sleep 2 done [ "$(ip addr show dev $INTF | grep -o 'inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*' | grep -o '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*')" != "$LOCALIP" ] && { diff --git a/glorytun-udp-post.sh b/glorytun-udp-post.sh index 09cba72..a62144c 100644 --- a/glorytun-udp-post.sh +++ b/glorytun-udp-post.sh @@ -5,7 +5,7 @@ INTF=gt-udp-${DEV} [ -z "$LOCALIP" ] && LOCALIP="10.255.254.1" [ -z "$BROADCASTIP" ] && BROADCASTIP="10.255.254.3" -while [ -z "$(ip link show $INTF)" ]; do +while [ -z "$(ip link show $INTF 2>/dev/null)" ]; do sleep 2 done [ "$(ip addr show dev $INTF | grep -o 'inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*' | grep -o '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*')" != "$LOCALIP" ] && { diff --git a/omr-service b/omr-service index 0b551da..568ce7b 100755 --- a/omr-service +++ b/omr-service @@ -14,7 +14,7 @@ _multipath() { } _glorytun_udp() { - [ -z "$(glorytun show dev gt-udp-tun0 2>/dev/null | grep server)" ] && { + [ -z "$(glorytun show dev gt-udp-tun0 2>/dev/null | grep tunnel)" ] && { logger -t "OMR-Service" "Restart Glorytun-UDP" systemctl -q restart 'glorytun-udp@*' }