]> the.earth.li Git - onak.git/blobdiff - keydb/keyd.c
Indicate when we've been started via socket activation
[onak.git] / keydb / keyd.c
index ff02116d239a28d62762cfa4b30f3b9f50455611..5b187854a04b453e0df95631948cce0575cd3ec0 100644 (file)
@@ -52,9 +52,7 @@
 /* Maximum number of clients we're prepared to accept at once */
 #define MAX_CLIENTS 16
 
-#ifdef HAVE_SYSTEMD
 static bool using_socket_activation = false;
-#endif
 
 static struct keyd_stats *stats;
 
@@ -682,7 +680,8 @@ int main(int argc, char *argv[])
 
                dbctx = config.dbinit(config.backend, false);
 
-               logthing(LOGTHING_NOTICE, "Accepting connections.");
+               logthing(LOGTHING_NOTICE, "Accepting connections%s",
+                       using_socket_activation ? " (via systemd)" : "");
                while (!cleanup() && select(maxfd + 1, &rfds, NULL, NULL, NULL) != -1) {
                        /*
                         * Deal with existing clients first; if we're at our
@@ -741,6 +740,7 @@ int main(int argc, char *argv[])
 
        free(stats);
 
+       logthing(LOGTHING_NOTICE, "Exiting");
        cleanuplogthing();
        cleanupconfig();