mirror of
https://github.com/house-of-vanity/Wireguard-Peer-Manager.git
synced 2025-08-21 15:37:15 +00:00
Fix reload
This commit is contained in:
4
gen.py
4
gen.py
@@ -303,14 +303,14 @@ def add_peer(peer_name):
|
|||||||
helper = Helper(cfg_path=config)
|
helper = Helper(cfg_path=config)
|
||||||
helper.add_peer(peer_name)
|
helper.add_peer(peer_name)
|
||||||
helper.wg.write_file()
|
helper.wg.write_file()
|
||||||
call("bash -c 'wg syncconf wg0 <(wg-quick strip wg0)'",shell=True)
|
call(f"bash -c 'wg syncconf {config} <(wg-quick strip {config})'",shell=True)
|
||||||
|
|
||||||
def del_peer(peer_name):
|
def del_peer(peer_name):
|
||||||
log.info(f'Remove given peer {peer_name}.')
|
log.info(f'Remove given peer {peer_name}.')
|
||||||
helper = Helper(cfg_path=config)
|
helper = Helper(cfg_path=config)
|
||||||
helper.del_peer(peer_name)
|
helper.del_peer(peer_name)
|
||||||
helper.wg.write_file()
|
helper.wg.write_file()
|
||||||
call("bash -c 'wg syncconf wg0 <(wg-quick strip wg0)'",shell=True)
|
call(f"bash -c 'wg syncconf {config} <(wg-quick strip {config})'",shell=True)
|
||||||
|
|
||||||
def update_configs():
|
def update_configs():
|
||||||
log.info("Update all clients configs.")
|
log.info("Update all clients configs.")
|
||||||
|
Reference in New Issue
Block a user