mirror of
https://github.com/house-of-vanity/Wireguard-Peer-Manager.git
synced 2025-08-21 15:37:15 +00:00
fix
This commit is contained in:
4
gen.py
4
gen.py
@@ -112,7 +112,7 @@ class Wireguard(TypedDict):
|
|||||||
wg_state = Wireguard({})
|
wg_state = Wireguard({})
|
||||||
|
|
||||||
|
|
||||||
def wg_json(config="all"):
|
def wg_if_status(config="all"):
|
||||||
cmd = ["/usr/bin/wg", "show", config, "dump"]
|
cmd = ["/usr/bin/wg", "show", config, "dump"]
|
||||||
proc = Popen(cmd,
|
proc = Popen(cmd,
|
||||||
stdout=PIPE,
|
stdout=PIPE,
|
||||||
@@ -329,6 +329,6 @@ if __name__ == '__main__':
|
|||||||
elif is_update:
|
elif is_update:
|
||||||
update_configs()
|
update_configs()
|
||||||
elif json:
|
elif json:
|
||||||
print(wg_json()['wg0']['peers'][0])
|
print(wg_if_status()['wg0']['peers'][0])
|
||||||
else:
|
else:
|
||||||
print(help_msg)
|
print(help_msg)
|
||||||
|
Reference in New Issue
Block a user