summaryrefslogtreecommitdiffstats
path: root/pacredir.c
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2016-12-01 21:35:18 +0100
committerGravatar Christian Hesse <mail@eworm.de>2016-12-01 21:35:18 +0100
commitb24304ebe9d45044db4798f904d55cc26bca977c (patch)
treec65dd1f1e3bb4c63be855143c6ddfd8522424c17 /pacredir.c
parentd95a2a13593224986628ceff346eed07007c199c (diff)
downloadpacredir-b24304ebe9d45044db4798f904d55cc26bca977c.tar.gz
pacredir-b24304ebe9d45044db4798f904d55cc26bca977c.tar.zst
Use systemd service manager notification
Notify systemd service manager when our initialization sequence completed.
Diffstat (limited to 'pacredir.c')
-rw-r--r--pacredir.c3
1 files changed, 3 insertions, 0 deletions
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);