Hide run output
This commit is contained in:
parent
97171ec799
commit
4c75251c20
4
woven.py
4
woven.py
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from fabric import Connection
|
from fabric import Connection, Config
|
||||||
from invoke.exceptions import UnexpectedExit
|
from invoke.exceptions import UnexpectedExit
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from sys import stderr
|
from sys import stderr
|
||||||
|
@ -49,7 +49,7 @@ def generate_wg_configs(config: WovenConfig):
|
||||||
except NetmaskValueError:
|
except NetmaskValueError:
|
||||||
raise ValueError("invalid IPv6 PtP network subnet")
|
raise ValueError("invalid IPv6 PtP network subnet")
|
||||||
|
|
||||||
cs = { id: Connection(node.listen_address, user = "root") for id, node in config.nodes.items() }
|
cs = { id: Connection(node.listen_address, user = "root", config = Config(overrides = { "run": { "hide": True } })) for id, node in config.nodes.items() }
|
||||||
for c in cs.values():
|
for c in cs.values():
|
||||||
c.run("for f in /etc/wireguard/*-loop.conf; do systemctl stop wg-quick@$(basename $f .conf).service; done")
|
c.run("for f in /etc/wireguard/*-loop.conf; do systemctl stop wg-quick@$(basename $f .conf).service; done")
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue