Added code to rebuild citadel.control if it gets deleted some how.
[citadel.git] / citadel / server_main.c
index a2bc2b4ef5c325e72e7485148160b6628a90c082..f13a77361275d59f30c74137d8a239049fdf9a3f 100644 (file)
@@ -216,9 +216,6 @@ int main(int argc, char **argv)
        config.c_ipgm_secret = rand();
        put_config();
 
-       lprintf(CTDL_INFO, "Acquiring control record\n");
-       get_control();
-
 #ifdef HAVE_RUN_DIR
        /* on some dists rundir gets purged on startup. so we need to recreate it. */
 
@@ -243,6 +240,9 @@ int main(int argc, char **argv)
         */
        master_startup();
 
+       lprintf(CTDL_INFO, "Acquiring control record\n");
+       get_control();
+
        /*
         * Bind the server to a Unix-domain socket.
         */