Browse Source

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
Ilya Mashchenko 1 year ago
parent
commit
af798e3b94
2 changed files with 2 additions and 1 deletions
  1. 1 1
      system/install-service.sh.in
  2. 1 0
      system/launchd/netdata.plist.in

+ 1 - 1
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

+ 1 - 0
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/>