diff options
author | John Estabrook <jestabro@sentrium.io> | 2019-08-06 14:19:32 -0500 |
---|---|---|
committer | John Estabrook <jestabro@sentrium.io> | 2019-08-07 14:24:39 -0500 |
commit | f86d22ec54ee80cc54ae80edc0bbad8e419ba95c (patch) | |
tree | cc178d8470d5413d066460e09542b9ea56d3a235 /src/conf_mode/http-api.py | |
parent | 097a088725eb632bec3e09a2e563fc96139d86ba (diff) | |
download | vyos-1x-f86d22ec54ee80cc54ae80edc0bbad8e419ba95c.tar.gz vyos-1x-f86d22ec54ee80cc54ae80edc0bbad8e419ba95c.zip |
[service https] T1443: reset defaults on 'delete service https api'
Diffstat (limited to 'src/conf_mode/http-api.py')
-rwxr-xr-x | src/conf_mode/http-api.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/conf_mode/http-api.py b/src/conf_mode/http-api.py index 7d618dded..c1d596ea3 100755 --- a/src/conf_mode/http-api.py +++ b/src/conf_mode/http-api.py @@ -84,15 +84,16 @@ def generate(http_api): def apply(http_api): if http_api is not None: os.system('sudo systemctl restart vyos-http-api.service') - for dep in dependencies: - cmd = '{0}/{1}'.format(vyos_conf_scripts_dir, dep) - try: - subprocess.check_call(cmd, shell=True) - except subprocess.CalledProcessError as err: - raise ConfigError("{}.".format(err)) else: os.system('sudo systemctl stop vyos-http-api.service') + for dep in dependencies: + cmd = '{0}/{1}'.format(vyos_conf_scripts_dir, dep) + try: + subprocess.check_call(cmd, shell=True) + except subprocess.CalledProcessError as err: + raise ConfigError("{}.".format(err)) + if __name__ == '__main__': try: c = get_config() |