After installing zebedee, I created the following plist file, which I name org.zebedee.zebedee.plist, conforming to the naming conventions used for other plist files:
<?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>org.zebedee.zebedee</string>
<key>ProgramArguments</key>
<array>
<string>/common/bin/zebedee</string>
<string>-s</string>
<string>-f</string>
<string>/local/etc/server.zbd</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/var/log/zebedee.log</string>
</dict>
</plist>
The idea is to execute the command "zebedee -s -f /local/etc/server.zbd". The only plist elements I use are:
- ProgramArguments, which specifies the program name and any command-line arguments, one item at a time
- RunAtLoad, which says that the program should be run when the plist file is loaded by launchd. (Launchd has the ability, like xinetd, to bind to a port and listen for incoming connections, then start up an appropriate program on-demand. I'm not doing it that way here.)
- StandardErrorPath, which specifies the name of the log file to which the programs stderr output should be sent.
root 2521 0.0 0.0 27528 180 ?? Ss 12:12PM 0:00.00 /common/bin/zebedee -s -f /local/etc/server.zbd
I then copied the file org.zebedee.zebedee.plist into /Library/LaunchDaemons/ and rebooted. The zebedee service was automatically started during the reboot.
No comments:
Post a Comment