summaryrefslogtreecommitdiffstats
path: root/ctdb
diff options
context:
space:
mode:
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/server/ctdb_daemon.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index f59b9b2edf2..edbc34c7a1f 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -1200,6 +1200,12 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog,
}
ctdb_set_child_logging(ctdb);
+ if (use_syslog) {
+ if (start_syslog_daemon(ctdb)) {
+ DEBUG(DEBUG_CRIT, ("Failed to start syslog daemon\n"));
+ exit(10);
+ }
+ }
/* initialize statistics collection */
ctdb_statistics_init(ctdb);
@@ -1303,13 +1309,6 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog,
exit(1);
}
- if (use_syslog) {
- if (start_syslog_daemon(ctdb)) {
- DEBUG(DEBUG_CRIT, ("Failed to start syslog daemon\n"));
- exit(10);
- }
- }
-
ctdb_lockdown_memory(ctdb);
/* go into a wait loop to allow other nodes to complete */