Added persistent keep alive script instead of built in wireguard ping process

This commit is contained in:
2023-08-01 06:24:36 +00:00
parent bd43aaea64
commit 3cc178f690

6
persistentkeepalive.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
sleep 15;
PERSISTENT_KEEP_ALIVE=$(cat /etc/wireguard/wg0.conf | grep PersistentKeepalive | awk '{print $3}');
WG_SERVER_IP="$(cat /etc/wireguard/wg0.conf | grep Address | awk '{print $3}' | cut -d . -f1-3).1";
ping -s 0 -I wg0 -i $PERSISTENT_KEEP_ALIVE $WG_SERVER_IP