8 lines
246 B
Bash
Executable File
8 lines
246 B
Bash
Executable File
#!/bin/sh
|
|
|
|
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;
|
|
|
|
/etc/wireguard/persistentkeepalive.sh &
|