summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2023-12-29 15:52:23 +0200
committerGitHub <noreply@github.com>2023-12-29 15:52:23 +0200
commitaf798e3b94123979f0011e0f385b1c46a78466fc (patch)
treeb93e72e670dbab5dbb634d1cf40ea5c2fa0073ea /system
parent9c4483077212216dbc7517540bc9c5e728507dee (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
Diffstat (limited to 'system')
-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/>