From d9fbad6a6bbba292f31fe50e57af893062c7a584 Mon Sep 17 00:00:00 2001 From: Thomas Mangin Date: Sat, 23 May 2020 07:33:47 +0100 Subject: systemd: T2494: use Type=notify with daemon Notify systemd via the notify API when the python daemon are ready to take connection https://github.com/torfsen/python-systemd-tutorial --- src/services/vyos-http-api-server | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/services/vyos-http-api-server') diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server index b256add98..38bf2f8ce 100755 --- a/src/services/vyos-http-api-server +++ b/src/services/vyos-http-api-server @@ -28,6 +28,7 @@ import vyos.config from flask import Flask, request from waitress import serve +import systemd.daemon from functools import wraps @@ -396,6 +397,7 @@ if __name__ == '__main__': signal.signal(signal.SIGTERM, sig_handler) + systemd.daemon.notify('READY=1') try: serve(app, host=server_config["listen_address"], port=server_config["port"]) -- cgit v1.2.3