So I have a plist to keep monit running:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
        <string>-d 60</string>

I can do launchctl load /Library/LaunchDaemons/com.monit.service.plist to start the service, but launchctl unload /Library/LaunchDaemons/com.monit.service.plist will not stop it. I can see that the process keeps running no matter what I do.

The process shows up like this(note how the binary path doesn't show up, only the last argument):

output of ps aux:

root            14656   0.0  0.0  2482248   1656   ??  S     6:55PM   0:00.09 -d 60

How can I write the launchd plist so that it will actually stop the freaking process whenever I want it to stop?

2 Answers 2


Get rid of the -d 60 arguments and use the launchd key StartInterval instead. Also make sure the process does not daemonize itself. According to the monit man page this is accomplished by using the -I option.

  • For the record, my monitrc file only had this:set daemon 60 and I needed this: set init set daemon 60. So essentially, I was daemonizing monit. Commented Jan 27, 2015 at 2:12

I suspect since it is running from /Library/LaunchDaemons/ and not the user ~/Library/LaunchAgents you need to use sudo to issue the command with permission.

sudo launchctl unload /Library/LaunchDaemons/com.monit.service.plist

  • I'm running these commands as root, so I don't think that's the issue. Commented Jan 23, 2015 at 5:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .