From 76ec6dd2c3a56fac5f09943a9f7af9f4e2d17682 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Fri, 5 Jan 2024 12:10:17 +0100 Subject: Update vpn-wireguard playbook --- data.d/vpn-wireguard/hooks/post-up | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 data.d/vpn-wireguard/hooks/post-up (limited to 'data.d/vpn-wireguard/hooks') diff --git a/data.d/vpn-wireguard/hooks/post-up b/data.d/vpn-wireguard/hooks/post-up new file mode 100755 index 0000000..948a9a8 --- /dev/null +++ b/data.d/vpn-wireguard/hooks/post-up @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Ping all known hosts, as it seems that the wireguard interface comes up when +# only after it gets used on the machine itself. +while read -r addr; +do + ping -c 1 -q -w 1 "$addr" & +done < <(awk -F= '/vpn-wireguard.ip/ { print $NF }' /etc/bashtard/hosts.d/*) + +wait -- cgit v1.1