Hi Patrick,
Without the -w flag and with help of your example (a little adapted to
fit the default opensource install locations),
I got virtuoso-t running as a daemon.
This is the .plist being used:
---
<?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>com.openlinksw.virtuoso-opensource</string>
<key>Program</key>
<string>/usr/local/virtuoso-opensource/bin/virtuoso-t</string>
<key>ProgramArguments</key>
<array>
<string>virtuoso</string>
<string> -f </string>
<string> -c virtuoso.ini </string>
</array>
<key>WorkingDirectory</key>
<string>/usr/local/virtuoso-opensource/var/lib/virtuoso/db/</string>
</dict>
</plist>
---
I noticed that the .plist creation is really sensitive, especially the
ProgramArguments.
With these commands the daemon starts:
$ sudo launchctl load /Library/LaunchDaemons/com.openlinksw.virtuoso-
opensource.plist
$ sudo launchctl start com.openlinksw.virtuoso-opensource
Usually a daemon can be stopped with:
$ sudo launchctl stop com.openlinksw.virtuoso-opensource
$ sudo launchctl unload /Library/LaunchDaemons/com.openlinksw.virtuoso-
opensource.plist
These commands execute without errors or messages.
However the virtuoso-t process is still running (consuming 123.74MB of
real memory).
So stopping the daemon does not work for me (yet).
Best,
~Ceriel
Op 9 jan 2009, om 16:56 heeft Patrick van Kleef het volgende geschreven:
<snip>
No the -w flag is incompatible with the way launchd works. This flag
caused virtuoso to fork into background, but returns any problems if
the background process fails to initialize properly. This is useful
in shell scripts where you want to wait until the server is
completely online before continuing with other commands.
I have tried the following settings for launchd and they seem to be
working:
<key>Label</key>
<string>com.openlink.virtuoso-opensource</string>
<key>Program</key>
<string>/usr/local/virtuoso-opensource/bin/virtuoso-t</string>
<key>ProgramArguments</key>
<array>
<string>virtuoso</string>
<string> -f </string>
<string> -c virtuoso.ini </string>
</array>
<key>WorkingDirectory</key>
<string>/usr/local/virtuoso-opensource/database/</string>
With this i was able to start virtuoso with:
launchctl start com.openlink.virtuoso-opensource
Let me know if this works for you too.
<snip>