bundlewrap/bundles/wireguard/files/pppd-ip-up
Franziska Kunsmann 8656f99f8e
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
bundles/wireguard: re-add reconnect script for added resiliency
2021-09-30 06:37:42 +02:00

10 lines
329 B
Bash

#!/bin/bash
# We need to send some traffic over the wireguard tunnel to make sure
# it gets connected. Easiest way is to simply send some pings to the
# other side.
% for peer, config in sorted(node.metadata.get('wireguard/peers', {}).items()):
# refresh connection to ${peer}
/usr/bin/ping -c 4 ${config['their_ip']}
% endfor