summaryrefslogtreecommitdiff
path: root/data.d/vpn-wireguard/hooks/post-up
blob: 948a9a8ea9e0587ad5d9f9d1e887028e24095c91 (plain)
1
2
3
4
5
6
7
8
9
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