From 0412c9042aafc4b6f6f30cd111dabd105e5ff846 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sun, 31 Oct 2021 09:49:37 +0100 Subject: [PATCH] bundles/wireguard: fix stderr handling of wg_health_check --- bundles/wireguard/files/wg_health_check | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bundles/wireguard/files/wg_health_check b/bundles/wireguard/files/wg_health_check index 1977401..976e112 100644 --- a/bundles/wireguard/files/wg_health_check +++ b/bundles/wireguard/files/wg_health_check @@ -13,9 +13,9 @@ everything_up=1 % for peer, ip in sorted(peers.items()): # ${peer} -if ! /usr/bin/ping -c 4 ${ip} >/dev/null +if ! /usr/bin/ping -c 4 ${ip} >/dev/null 2>&1 then - echo "${peer} was not reachable!" >&2 + echo "${peer} was not reachable!" everything_up=0 fi @@ -32,7 +32,7 @@ last_reached="$(cat /var/tmp/wg_all_reached)" if [[ "$last_reached" -lt "$five_min_ago" ]] then - echo "RESTART" >&2 + echo "RESTART" systemctl restart systemd-networkd