Ignore predown command exit codes
This commit is contained in:
parent
17d3fca3b3
commit
676934c175
6
woven.py
6
woven.py
|
@ -149,12 +149,18 @@ def generate_wg_configs(config: WovenConfig):
|
||||||
|
|
||||||
cs[id_a].put(StringIO(config_a.to_wgconfig(wgquick_format = True)), f"/etc/wireguard/{name_a}.conf")
|
cs[id_a].put(StringIO(config_a.to_wgconfig(wgquick_format = True)), f"/etc/wireguard/{name_a}.conf")
|
||||||
for p in predown_a:
|
for p in predown_a:
|
||||||
|
try:
|
||||||
cs[id_a].run(p)
|
cs[id_a].run(p)
|
||||||
|
except UnexpectedExit:
|
||||||
|
pass
|
||||||
cs[id_a].run(f"systemctl start wg-quick@{name_a}.service")
|
cs[id_a].run(f"systemctl start wg-quick@{name_a}.service")
|
||||||
|
|
||||||
cs[id_b].put(StringIO(config_b.to_wgconfig(wgquick_format = True)), f"/etc/wireguard/{name_b}.conf")
|
cs[id_b].put(StringIO(config_b.to_wgconfig(wgquick_format = True)), f"/etc/wireguard/{name_b}.conf")
|
||||||
for p in predown_b:
|
for p in predown_b:
|
||||||
|
try:
|
||||||
cs[id_b].run(p)
|
cs[id_b].run(p)
|
||||||
|
except UnexpectedExit:
|
||||||
|
pass
|
||||||
cs[id_b].run(f"systemctl start wg-quick@{name_b}.service")
|
cs[id_b].run(f"systemctl start wg-quick@{name_b}.service")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue