chiark / gitweb /
make-secnet-sites: Fix error handling if caller is in wrong group
[secnet.git] / secnet.c
index de16eb3aaa02832fda22ede160897543adf32026..2ebcddc1ae94491bbf5ad90edb1f12e3a84049dd 100644 (file)
--- a/secnet.c
+++ b/secnet.c
@@ -247,7 +247,7 @@ static void start_sites(dict_t *config) {
                cfgfatal(site->loc,"system","non-site closure in site list");
            }
            s=site->data.closure->interface;
-           s->control(s->st,True);
+           s->startup(s->st);
        }
     }
 }
@@ -329,8 +329,6 @@ static void run(void)
     struct pollfd *fds=0;
     int allocdfds=0, shortfall=0;
 
-    Message(M_NOTICE,"%s [%d]: starting\n",version,secnet_pid);
-
     do {
        if (gettimeofday(&tv_now_global, NULL)!=0) {
            fatal_perror("main loop: gettimeofday");
@@ -517,6 +515,7 @@ int main(int argc, char **argv)
 
     enter_phase(PHASE_DAEMONIZE);
     become_daemon();
+    Message(M_NOTICE,"%s [%d]: starting\n",version,secnet_pid);
     
     enter_phase(PHASE_GETRESOURCES);
     /* Appropriate phase hooks will have been run */