summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-05-23 07:09:10 +0100
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-06-25 10:54:40 +0100
commitd41708ee247ce5efc5dc06f2d233e8d620fc6e4a (patch)
treef6dd3730137d86c5034bf471db78e0a8aec72f80 /src
parent9fc8158f98ba7154da9867d9a28f00e39f76d0e0 (diff)
downloadvyos-1x-d41708ee247ce5efc5dc06f2d233e8d620fc6e4a.tar.gz
vyos-1x-d41708ee247ce5efc5dc06f2d233e8d620fc6e4a.zip
http-api: T2494: always exit with non zero on failure
systemd is setup with Restart=on-failure thereforer the service will only be restarted if the daemon died and reported an error. Previously any OsError would cause a exit(0) and therefore the API would not have been restarted. https://www.freedesktop.org/software/systemd/man/systemd.service.html
Diffstat (limited to 'src')
-rwxr-xr-xsrc/services/vyos-http-api-server2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server
index 4c41fa96d..b256add98 100755
--- a/src/services/vyos-http-api-server
+++ b/src/services/vyos-http-api-server
@@ -400,4 +400,4 @@ if __name__ == '__main__':
serve(app, host=server_config["listen_address"],
port=server_config["port"])
except OSError as e:
- print(f"OSError {e}")
+ sys.exit(f"OSError {e}")