How to correctly add daemon in MacOS 10.6.6 via launchd?
- by Eye of Hell
Hello.
I have a very simple task to accomplish: to start tomcat application server on latest MacOS as a daemon. I have performed following steps:
Installed Tomcat in /Library/Tomcat/Home
Validated that it runs fine by executed /Library/Tomcat/Home/bin/startup.sh
Added org.apache.tomcat.plist file to /Library/LaunchDaemons as found on internet (http://blog.i18n.ro/complete-guide-for-installing-hudson-ci-on-os-x-10-6/)
Instructed MacOS to load a daemon description via sudo launchctl load org.apache.tomcat.plist. It succeeded (issuing this command second time outputs "already loaded").
Instructed MacOS to start a daeon via sudo launchctl start org.apache.tomcat.plist
At this point MacOS shows an error "launchctl start error: No such process". I have checked the logfile for launchd - it have no record for this error. Google says nothing. And from error text i can't figure out what is the "process" and why it is "wrong" :(. Any hints what i'm doing wrong?