X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Ftincd.c;h=d2ce14d03fb00f0a4d566f7f8f01b47c9b5b3371;hp=0b02aad4daef42e92bd62bee3a44f739b96f10d6;hb=2ed68134047a19e708c2a2af32c58968835a7043;hpb=5d1145f2c4b3b8261ca0aa0e89a2daf321640f0b diff --git a/src/tincd.c b/src/tincd.c index 0b02aad4..d2ce14d0 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: tincd.c,v 1.10.4.30 2000/11/16 22:12:23 zarq Exp $ + $Id: tincd.c,v 1.10.4.33 2000/11/22 16:19:07 zarq Exp $ */ #include "config.h" @@ -64,6 +64,7 @@ #include "conf.h" #include "net.h" #include "netutl.h" +#include "process.h" #include "protocol.h" #include "subnet.h" @@ -247,7 +248,7 @@ void make_names(void) if(netname) { if(!pidfilename) - asprintf(&pidfilename, "/var/run/tinc.%s.pid", netname); + asprintf(&pidfilename, LOCALSTATEDIR "/run/tinc.%s.pid", netname); if(!confbase) asprintf(&confbase, "%s/tinc/%s", CONFDIR, netname); else @@ -258,7 +259,7 @@ void make_names(void) else { if(!pidfilename) - pidfilename = "/var/run/tinc.pid"; + pidfilename = LOCALSTATEDIR "/run/tinc.pid"; if(!confbase) asprintf(&confbase, "%s/tinc", CONFDIR); if(!identname) @@ -320,6 +321,8 @@ main(int argc, char **argv, char **envp) if(read_server_config()) return 1; + init_processes(); + if(detach()) exit(0);