diff options
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c index 160bfa00e0..9fa62f89ef 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -75,6 +75,10 @@ #include <event2/bufferevent.h> #endif +#ifdef HAVE_SYSTEMD +#include <systemd/sd-daemon.h> +#endif + void evdns_shutdown(int); /********* PROTOTYPES **********/ @@ -2043,6 +2047,11 @@ do_main_loop(void) } #endif +#ifdef HAVE_SYSTEMD + log_notice(LD_GENERAL, "Signaling readyness to systemd"); + sd_notify(0, "READY=1"); +#endif + for (;;) { if (nt_service_is_stopping()) return 0; |