Add Torrent auto-config
This commit is contained in:
6
services/torrents/config/97-gateway-setup
Normal file
6
services/torrents/config/97-gateway-setup
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/command/with-contenv bash
|
||||
|
||||
wgserver=$(grep Endpoint "${CONFIG_DIR}/wireguard/wg0.conf" | awk '{print $3}')
|
||||
gateway=$(ip -o -4 route show to default | awk '{print $3}')
|
||||
|
||||
ip -4 route add ${wgserver%:*} via ${gateway} dev eth0
|
||||
Reference in New Issue
Block a user