updates
authorPekka Riikonen <priikone@silcnet.org>
Sun, 4 Nov 2001 14:44:07 +0000 (14:44 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sun, 4 Nov 2001 14:44:07 +0000 (14:44 +0000)
acconfig.h.pre
apps/silcd/silcd.c
apps/silcd/silcd.h
configure.in.pre

index 1b0e211e4e3796ab6e93bc17457fb84cc02d7271..a1649da8425858692513eb33a48df63b95c9a959 100644 (file)
@@ -10,6 +10,9 @@
 /* Default configuration file */
 #undef SILC_SERVER_CONFIG_FILE
 
+/* Default pid file */
+#undef SILC_SERVER_PID_FILE
+
 /* Multi-thread support */
 #undef SILC_THREADS
 #undef SILC_HAVE_PTHREAD
index ed64407f3b5762a27df78aba40c04b8e7982656d..abc53ac7064f3480409b533c8f3347040573863a 100644 (file)
@@ -200,10 +200,10 @@ int main(int argc, char **argv)
     silc_server_daemonise(silcd);
 
   /* Set /var/run/silcd.pid */
-  unlink("/var/run/silcd/pid");
+  unlink(SILC_SERVER_PID_FILE);
   memset(pid, 0, sizeof(pid));
   snprintf(pid, sizeof(pid) - 1, "%d\n", getpid());
-  silc_file_writefile("/var/run/silcd.pid", pid, strlen(pid));
+  silc_file_writefile(SILC_SERVER_PID_FILE, pid, strlen(pid));
   
   /* Run the server. When this returns the server has been stopped
      and we will exit. */
index 512ce94a3e44e807bf7eabefbbe211bc5a21a5ff..a9d7b6f30431ef30d37b5b8fbb6562a835cdba33 100644 (file)
 #define SILC_SERVER_CONFIG_FILE "/etc/silc/silcd.conf"
 #endif
 
+#ifndef SILC_SERVER_PID_FILE
+#define SILC_SERVER_PID_FILE "/var/run/silcd.pid"
+#endif
+
 #define SILC_SERVER_PUBLIC_KEY_NAME "/silcd.pub"
 #define SILC_SERVER_PRIVATE_KEY_NAME "/silcd.prv"
 
index dfbd9c9ad63de67a0c2a21af5c8c4ffff56516f8..ef9c084e88c417a8e1d9c52911e9dc46e28b6efe 100644 (file)
@@ -575,6 +575,12 @@ AC_ARG_WITH(silcd-config-file,
                           server [/etc/silc/silcd.conf]],
 [ AC_DEFINE_UNQUOTED(SILC_SERVER_CONFIG_FILE, "$withval") ])
 
+AC_ARG_WITH(silcd-pid-file,
+[  --with-silcd-pid-file[=PATH]
+                          Use PATH as default pid file in SILC
+                          server [/var/run/silcd.pid]],
+[ AC_DEFINE_UNQUOTED(SILC_SERVER_PID_FILE, "$withval") ])
+
 #
 # Native WIN32 compilation under cygwin
 #