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
This commit is contained in:
Ilya Mashchenko 2023-12-29 15:52:23 +02:00 committed by GitHub
parent 9c44830772
commit af798e3b94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -8,6 +8,7 @@
<key>ProgramArguments</key>
<array>
<string>@sbindir_POST@/netdata</string>
<string>-D</string>
</array>
<key>RunAtLoad</key>
<true/>