projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add support for systemd style socket activation.
[tinc]
/
src
/
tincd.c
diff --git
a/src/tincd.c
b/src/tincd.c
index
443301e
..
148e13e
100644
(file)
--- a/
src/tincd.c
+++ b/
src/tincd.c
@@
-539,6
+539,12
@@
int main(int argc, char **argv) {
g_argv = argv;
+ if(getenv("LISTEN_PID") && atoi(getenv("LISTEN_PID")) == getpid())
+ do_detach = false;
+#ifdef HAVE_UNSETENV
+ unsetenv("LISTEN_PID");
+#endif
+
init_configuration(&config_tree);
/* Slllluuuuuuurrrrp! */