X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Ftincd.c;h=d2ce14d03fb00f0a4d566f7f8f01b47c9b5b3371;hp=224a9f91eeba6b2dccaf30310d3ff38ac3303c6b;hb=2ed68134047a19e708c2a2af32c58968835a7043;hpb=9024e01ce649b89d304a4aa5b1d6ef0b56b5a12c diff --git a/src/tincd.c b/src/tincd.c index 224a9f91..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.31 2000/11/20 18:06:17 zarq Exp $ + $Id: tincd.c,v 1.10.4.33 2000/11/22 16:19:07 zarq Exp $ */ #include "config.h" @@ -248,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 @@ -259,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) @@ -321,6 +321,8 @@ main(int argc, char **argv, char **envp) if(read_server_config()) return 1; + init_processes(); + if(detach()) exit(0);