This repository has been archived on 2024-03-03. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
adlin/token-validator/clean-wg.sh
Pierre-Olivier Mercier 73a6323571
Some checks failed
continuous-integration/drone/push Build is failing
token-validator: add clean-wg helper script
2023-03-15 05:26:34 +01:00

8 lines
189 B
Bash

#!/bin/sh
# Clean wg
while true
do
sleep 900
wg show wg-adlin dump | egrep "^\S+\s+\S+\s+\S+\s+\(none\)" | while read pubkey end; do wg set wg-adlin peer $pubkey remove; done
done