summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/systemd-socket-proxyd.xml2
-rw-r--r--src/socket-proxy/socket-proxyd.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/man/systemd-socket-proxyd.xml b/man/systemd-socket-proxyd.xml
index e512a4334e..bf51c0558c 100644
--- a/man/systemd-socket-proxyd.xml
+++ b/man/systemd-socket-proxyd.xml
@@ -104,6 +104,7 @@ Requires=proxy-to-nginx.socket
After=proxy-to-nginx.socket
[Service]
+Type=notify
ExecStart=/usr/lib/systemd/systemd-socket-proxyd /run/nginx/socket
PrivateTmp=yes
PrivateNetwork=yes]]></programlisting>
@@ -151,6 +152,7 @@ After=proxy-to-nginx.socket
JoinsNamespaceOf=nginx.service
[Service]
+Type=notify
ExecStart=/usr/lib/systemd/systemd-socket-proxyd 127.0.0.1:8080
PrivateTmp=yes
PrivateNetwork=yes]]></programlisting>
diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c
index 821049e667..f336fbd55e 100644
--- a/src/socket-proxy/socket-proxyd.c
+++ b/src/socket-proxy/socket-proxyd.c
@@ -15,6 +15,7 @@
#include "alloc-util.h"
#include "build.h"
+#include "daemon-util.h"
#include "errno-util.h"
#include "fd-util.h"
#include "log.h"
@@ -672,6 +673,7 @@ static int parse_argv(int argc, char *argv[]) {
static int run(int argc, char *argv[]) {
_cleanup_(context_clear) Context context = {};
+ _unused_ _cleanup_(notify_on_cleanup) const char *notify_stop = NULL;
int r, n, fd;
log_parse_environment();
@@ -709,6 +711,7 @@ static int run(int argc, char *argv[]) {
return r;
}
+ notify_stop = notify_start(NOTIFY_READY, NOTIFY_STOPPING);
r = sd_event_loop(context.event);
if (r < 0)
return log_error_errno(r, "Failed to run event loop: %m");