From b24304ebe9d45044db4798f904d55cc26bca977c Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 1 Dec 2016 21:35:18 +0100 Subject: Use systemd service manager notification Notify systemd service manager when our initialization sequence completed. --- pacredir.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pacredir.c') diff --git a/pacredir.c b/pacredir.c index b704f1c..afb9e8f 100644 --- a/pacredir.c +++ b/pacredir.c @@ -720,6 +720,9 @@ int main(int argc, char ** argv) { signal(SIGKILL, sig_callback); signal(SIGINT, sig_callback); + /* report ready to systemd */ + sd_notifyf(0, "READY=1\nSTATUS=Waiting for requests to redirect...\nMAINPID=%lu", (unsigned long) getpid()); + /* run the main loop */ avahi_simple_poll_loop(simple_poll); -- cgit v1.2.3-54-g00ecf