...
OS X 10.4+ uses the launchd
daemon for startup services. Getting OFBiz to run as a server is really simple using this approach.
1 Create the org.apache.ofbiz.plist
configuration file. A plist
configuration file is nothing more than an XML
file with the .plist
extension. Use the sample script below (but be sure to change the WorkingDirectory
property and create a file named org.apache.ofbiz.plist
:
Code Block |
---|
<?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"> <dict> <key>Disabled</key> <false/> <key>Label</key> <string>org.apache.ofbiz</string> <key>WorkingDirectory</key> <string>/Users/jaz/Sandbox/ofbiz</string> <key>ProgramArguments</key> <array> <string>./startofbiz.sh</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist> |
You can change the RunAtLoad
property if you want to stop OFBiz auto-starting.
1 To test the startup script you use launchctl
. The following command will start OFBiz
as the current user:
Code Block |
---|
$ launchctl load org.apache.ofbiz.plist |
...