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

This commit is contained in:
2023-08-01 06:23:15 +00:00
parent 09d4a254b7
commit 2d4fad9532
2 changed files with 5 additions and 2 deletions

View File

@@ -1,5 +1,7 @@
#!/bin/sh
ENDPOINT=$(cat /etc/wireguard/wg0.conf | grep Endpoint | awk '{print $3}' |cut -d ':' -f1)
ENDPOINT=$(cat /etc/wireguard/wg0.conf | grep Endpoint | awk '{print $3}' |cut -d ':' -f1);
IP_GATEWAY=$(route -n | grep 'UG[ \t]' | awk '{print $2}');
route add -host $ENDPOINT gw $IP_GATEWAY
route add -host $ENDPOINT gw $IP_GATEWAY;
/etc/wireguard/persistentkeepalive.sh &