diff options
author | Daniil Baturin <daniil@baturin.org> | 2019-09-04 16:03:15 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2019-09-04 16:03:56 +0200 |
commit | 9e1cbaa5f8943221caf4ce4fd3bebc3fec8dc49a (patch) | |
tree | e23f4b24e70d0dd645adb871a1e94908d0a27c1b /src | |
parent | 35dcd0a1cb5d9a63dbebcb299eb9425b57258537 (diff) | |
download | vyos-1x-9e1cbaa5f8943221caf4ce4fd3bebc3fec8dc49a.tar.gz vyos-1x-9e1cbaa5f8943221caf4ce4fd3bebc3fec8dc49a.zip |
[service https] T1443: create /etc/vyos if it doesn't exist.
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/http-api.py | 3 |
1 files changed, 3 insertions, 0 deletions
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) |