From bafe6abf047a434bc42fa34e7def3bfdbe954f28 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Sun, 12 Feb 2017 00:28:25 -0500 Subject: [PATCH] [core] include lighttpd vers in server started msg --- src/log.c | 2 -- src/server.c | 9 ++++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/log.c b/src/log.c index 0b5d560c..3c56d8fa 100644 --- a/src/log.c +++ b/src/log.c @@ -214,8 +214,6 @@ int log_error_open(server *srv) { srv->errorlog_mode = (logfile[0] == '|') ? ERRORLOG_PIPE : ERRORLOG_FILE; } - log_error_write(srv, __FILE__, __LINE__, "s", "server started"); - if (srv->errorlog_mode == ERRORLOG_FD && !srv->srvconf.dont_daemonize) { /* We can only log to stderr in dont-daemonize mode; * if we do daemonize and no errorlog file is specified, we log into /dev/null diff --git a/src/server.c b/src/server.c index 5ea60e1c..9f16b468 100644 --- a/src/server.c +++ b/src/server.c @@ -1258,9 +1258,12 @@ static int server_main (server * const srv, int argc, char **argv) { /* Close stderr ASAP in the child process to make sure that nothing * is being written to that fd which may not be valid anymore. */ - if (!srv->srvconf.preflight_check && -1 == log_error_open(srv)) { - log_error_write(srv, __FILE__, __LINE__, "s", "Opening errorlog failed. Going down."); - return -1; + if (!srv->srvconf.preflight_check) { + if (-1 == log_error_open(srv)) { + log_error_write(srv, __FILE__, __LINE__, "s", "Opening errorlog failed. Going down."); + return -1; + } + log_error_write(srv, __FILE__, __LINE__, "s", "server started (" PACKAGE_DESC ")"); } if (buffer_is_empty(srv->config_storage[0]->server_tag)) {