This repository has been archived on 2024-03-03. You can view files and clone it, but cannot push or open issues or pull requests.
adlin/token-validator/clean-wg.sh
Pierre-Olivier Mercier 71fb309c33
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Also call wg-sync on start
2023-03-16 02:30:46 +01:00

11 lines
207 B
Bash

#!/bin/sh
/root/wg-sync.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