summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/control1
-rwxr-xr-xsrc/services/vyos-hostsd1
-rwxr-xr-xsrc/services/vyos-http-api-server2
-rw-r--r--src/systemd/vyos-hostsd.service2
-rw-r--r--src/systemd/vyos-http-api.service2
5 files changed, 6 insertions, 2 deletions
diff --git a/debian/control b/debian/control
index 5e14340a8..aaf8fa1e7 100644
--- a/debian/control
+++ b/debian/control
@@ -36,6 +36,7 @@ Depends: python3,
python3-xmltodict,
python3-pyudev,
python3-voluptuous,
+ python3-systemd,
bsdmainutils,
cron,
etherwake,
diff --git a/src/services/vyos-hostsd b/src/services/vyos-hostsd
index 0079f7e5c..53ac5a770 100755
--- a/src/services/vyos-hostsd
+++ b/src/services/vyos-hostsd
@@ -592,6 +592,7 @@ if __name__ == '__main__':
socket.bind(SOCKET_PATH)
os.umask(o_mask)
+ systemd.daemon.notify('READY=1')
while True:
# Wait for next request from client
msg_json = socket.recv().decode()
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"])
diff --git a/src/systemd/vyos-hostsd.service b/src/systemd/vyos-hostsd.service
index b77335778..418601d1a 100644
--- a/src/systemd/vyos-hostsd.service
+++ b/src/systemd/vyos-hostsd.service
@@ -14,7 +14,7 @@ WorkingDirectory=/run/vyos-hostsd
RuntimeDirectory=vyos-hostsd
RuntimeDirectoryPreserve=yes
ExecStart=/usr/bin/python3 -u /usr/libexec/vyos/services/vyos-hostsd
-Type=idle
+Type=notify
KillMode=process
SyslogIdentifier=vyos-hostsd
diff --git a/src/systemd/vyos-http-api.service b/src/systemd/vyos-http-api.service
index 4fa68b4ff..636973be7 100644
--- a/src/systemd/vyos-http-api.service
+++ b/src/systemd/vyos-http-api.service
@@ -6,7 +6,7 @@ Requires=vyos-router.service
[Service]
ExecStartPre=/usr/libexec/vyos/init/vyos-config
ExecStart=/usr/bin/python3 -u /usr/libexec/vyos/services/vyos-http-api-server
-Type=idle
+Type=notify
KillMode=process
SyslogIdentifier=vyos-http-api