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:15 +0200 |
commit | bc8a1218bae92320b93093cadbc8390b52a46204 (patch) | |
tree | a4af0c508224ea5b26a8422e1b071536e0e286c8 /src/conf_mode | |
parent | 4d50edfc9543f3d27eb83300dd27d598ffe63fe2 (diff) | |
download | vyos-1x-bc8a1218bae92320b93093cadbc8390b52a46204.tar.gz vyos-1x-bc8a1218bae92320b93093cadbc8390b52a46204.zip |
[service https] T1443: create /etc/vyos if it doesn't exist.
Diffstat (limited to 'src/conf_mode')
-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) |