I've installed cntlm on osx using the homebrew formula.
Then I've copied the .plist file and started the daemon:
sudo cp -fv /usr/local/opt/cntlm/*.plist /Library/LaunchDaemons
sudo chown root /Library/LaunchDaemons/homebrew.mxcl.cntlm.plist
But after the reboot the daemon isn't running. I've tried to run it manually with
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.cntlm.plist
but its output is
/Library/LaunchDaemons/homebrew.mxcl.cntlm.plist: Operation already in progress
I've also checked the plist file with plutil -lint
and it is ok.
This is the source of /Library/LaunchDaemons/homebrew.mxcl.cntlm.plist
:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.cntlm</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/cntlm/bin/cntlm</string>
</array>
<key>KeepAlive</key>
<false/>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/var/null</string>
<key>StandardErrorPath</key>
<string>/var/null</string>
</dict>
</plist>
Do you know why this happen and how to run it correctly as a daemon?
system.log
using Console.app for messages.launchd
is typically good at logging useful errors and warnings about why a job is not running. Do you see the job being logged as started?ps aux
if cntlm is running, but no process exists. See also github.com/Homebrew/homebrew/issues/44741~/Library/LaunchAgents
and change Output and error to~/Library/Logs/a_log_file_appropriate
so you can get some information rather than null.