[server] don't print PID file existence warning in daemon mode (suggested by Ilya...
authorMichael Rash <mbr@cipherdyne.org>
Thu, 25 Jul 2013 03:04:31 +0000 (23:04 -0400)
committerMichael Rash <mbr@cipherdyne.org>
Thu, 25 Jul 2013 03:04:31 +0000 (23:04 -0400)
server/fwknopd.c

index caeada0..6726305 100644 (file)
@@ -707,7 +707,8 @@ get_running_pid(const fko_srv_options_t *opts)
 
     if(op_fd == -1)
     {
-        perror("Error trying to open PID file: ");
+        if((opts->foreground != 0) && (opts->verbose != 0))
+            perror("Error trying to open PID file: ");
         return(rpid);
     }