From 9e1cbaa5f8943221caf4ce4fd3bebc3fec8dc49a Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Wed, 4 Sep 2019 16:03:15 +0200 Subject: [service https] T1443: create /etc/vyos if it doesn't exist. --- src/conf_mode/http-api.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/conf_mode/http-api.py b/src/conf_mode/http-api.py index 1f91ac582..9c062f0aa 100755 --- a/src/conf_mode/http-api.py +++ b/src/conf_mode/http-api.py @@ -69,6 +69,9 @@ def generate(http_api): if http_api is None: return None + if not os.path.exists('/etc/vyos'): + os.mkdir('/etc/vyos') + with open(config_file, 'w') as f: json.dump(http_api, f, indent=2) -- cgit v1.2.3