mirror of
https://github.com/Kiritow/wg-ops.git
synced 2024-03-22 13:11:37 +08:00
Fix: Add route on wireguard reload
This should be done by wg-quick. However wg-quick does not provide a sync command.
This commit is contained in:
parent
e0acc71be4
commit
8bb3dcda9f
|
@ -156,6 +156,9 @@ sudo cp local/{}.conf /etc/wireguard/
|
|||
sudo -- bash -c "wg syncconf {} <(wg-quick strip {})"
|
||||
'''.format(config["interface"], config["interface"], config["interface"]))
|
||||
|
||||
for info in config["peers"]:
|
||||
f.write("sudo ip -4 route add {} dev {}\n".format(info["allowed"]), config["interface"])
|
||||
|
||||
|
||||
logger.info('''[Done] Config generated. Before you run start.sh, besure to:
|
||||
1. Disable SSH Server password login.
|
||||
|
|
Loading…
Reference in New Issue
Block a user