]> the.earth.li Git - onak.git/blobdiff - cleanup.c
0.6.3 release
[onak.git] / cleanup.c
index ecb33220db942b9c0fa1c84dfc8c80149dfcb700..95f74ddc3a867c8c63ba28b4a54a4ab8cc29e414 100644 (file)
--- a/cleanup.c
+++ b/cleanup.c
@@ -1,19 +1,27 @@
 /*
  * cleanup.c - Cleanup and shutdown framework.
  *
- * Jonathan McDowell <noodles@earth.li>
+ * Copyright 2004 Jonathan McDowell <noodles@earth.li>
  *
- * Copyright 2004 Project Purple
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
 #include <signal.h>
 #include <stdbool.h>
-#include <stdlib.h>
-#include <string.h>
 
 #include "cleanup.h"
-#include "keydb.h"
 #include "log.h"
+#include "onak-conf.h"
 
 static bool should_cleanup = false;
 
@@ -65,6 +73,10 @@ void sig_cleanup(int signal)
  */
 void catchsignals(void)
 {
+       if (config.use_keyd) {
+               return;
+       }
+
        logthing(LOGTHING_INFO, "Catching signals");
 
        signal(SIGALRM, &sig_cleanup);