summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2023-12-29 15:52:23 +0200
committerTasos Katsoulas <12612986+tkatsoulas@users.noreply.github.com>2024-02-06 16:33:22 +0200
commit58e9ba2b45b4e576dfe4812eb7ed2297a6e217a8 (patch)
treef88bee8c7c351e2af051fc864af4f41e3ee8084c
parenteba299fd167be30ed67daecbd16593419a270809 (diff)
fix installing service file and start/stop ND using `launchctl` on macOS (#16693)
* fix path to netdata.plist * add "do not fork" arg to netdata.plist (cherry picked from commit af798e3b94123979f0011e0f385b1c46a78466fc)
-rwxr-xr-xsystem/install-service.sh.in2
-rw-r--r--system/launchd/netdata.plist.in1
2 files changed, 2 insertions, 1 deletions
diff --git a/system/install-service.sh.in b/system/install-service.sh.in
index a885a8618c..cdd1bf52f5 100755
--- a/system/install-service.sh.in
+++ b/system/install-service.sh.in
@@ -625,7 +625,7 @@ freebsd_cmds() {
install_darwin_service() {
info "Installing macOS plist file for launchd."
- if ! install -C -S -p -m 0644 -o 0 -g 0 system/launchd/netdata.plist /Library/LaunchDaemons/com.github.netdata.plist; then
+ if ! install -C -S -p -m 0644 -o 0 -g 0 "${SVC_SOURCE}/launchd/netdata.plist" /Library/LaunchDaemons/com.github.netdata.plist; then
error "Failed to copy plist file."
exit 4
fi
diff --git a/system/launchd/netdata.plist.in b/system/launchd/netdata.plist.in
index a969b31775..bce489efa1 100644
--- a/system/launchd/netdata.plist.in
+++ b/system/launchd/netdata.plist.in
@@ -8,6 +8,7 @@
<key>ProgramArguments</key>
<array>
<string>@sbindir_POST@/netdata</string>
+ <string>-D</string>
</array>
<key>RunAtLoad</key>
<true/>