diff --git a/utils.py b/utils.py index 0540e0f..33c45b0 100644 --- a/utils.py +++ b/utils.py @@ -314,6 +314,7 @@ def change_firewall(router_ports, main_ports, execute=None): else: main_ports.add(22) # always add ssh if execute: + FIREWALL_MAIN.parent.mkdir(parents=True, exist_ok=True) with open(FIREWALL_MAIN, 'w') as fil: fil.write(' '.join(str(p) for p in sorted(main_ports))) fil.write('\n')