aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@critical.ch>2023-05-17 14:44:00 +0200
committerGitHub <noreply@github.com>2023-05-17 14:44:00 +0200
commitd7c3a886e0adeb285dd9f8c55ba4642dd8780f34 (patch)
tree6293d9612a3cf4b77518dec6f409bcbd9c9fa9bf
parent521ee3bb8356c0916b7fb228612f06e07a841b36 (diff)
Fix default PID location for FreeBSD (#31)
When on FreeBSD, the PID file should be written to /var/run instead of /run.
-rw-r--r--src/options.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/options.c b/src/options.c
index 84227ae..f18c43e 100644
--- a/src/options.c
+++ b/src/options.c
@@ -157,7 +157,11 @@ static const struct option_usage usage[] = {
#endif
},
/** --daemon */
+#ifdef __FreeBSD__
+ {"pidfile", 0, OPT_STR, {.str = "/var/run/ptunnel.pid"},
+#else
{"pidfile", 0, OPT_STR, {.str = "/run/ptunnel.pid"},
+#endif
#ifdef WIN32
"(Not available on this platform.)\n"
#endif