summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorajs <ajs>2004-12-22 14:08:13 +0000
committerajs <ajs>2004-12-22 14:08:13 +0000
commit6028df528e0bba4a4d4e06d402b877e0b6b15428 (patch)
tree824fca18f249d6f7e794363639b3db13edad0fea
parentd01994307333ef34335b59f018feb5291322629a (diff)
2004-12-22 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* watchquagga.c: Get PATH_WATCHQUAGGA_PID from config.h.
-rw-r--r--watchquagga/ChangeLog4
-rw-r--r--watchquagga/watchquagga.c10
2 files changed, 13 insertions, 1 deletions
diff --git a/watchquagga/ChangeLog b/watchquagga/ChangeLog
index 0272655b..91541221 100644
--- a/watchquagga/ChangeLog
+++ b/watchquagga/ChangeLog
@@ -1,3 +1,7 @@
+2004-12-22 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+ * watchquagga.c: Get PATH_WATCHQUAGGA_PID from config.h.
+
2004-12-21 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* .cvsignore: Added.
diff --git a/watchquagga/watchquagga.c b/watchquagga/watchquagga.c
index c9b2cad8..194b807a 100644
--- a/watchquagga/watchquagga.c
+++ b/watchquagga/watchquagga.c
@@ -1,5 +1,5 @@
/*
- $Id: watchquagga.c,v 1.1 2004/12/22 02:56:59 ajs Exp $
+ $Id: watchquagga.c,v 1.2 2004/12/22 14:08:13 ajs Exp $
Monitor status of quagga daemons and restart if necessary.
@@ -35,6 +35,10 @@
#include <sys/wait.h>
/* Quagga headers: */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <thread.h>
#include <log.h>
#include <sigevent.h>
@@ -54,7 +58,11 @@
#define DEFAULT_LOGLEVEL LOG_INFO
#define DEFAULT_MIN_RESTART 60
#define DEFAULT_MAX_RESTART 600
+#ifdef PATH_WATCHQUAGGA_PID
+#define DEFAULT_PIDFILE PATH_WATCHQUAGGA_PID
+#else
#define DEFAULT_PIDFILE STATEDIR "/watchquagga.pid"
+#endif
#define PING_TOKEN "PING"