Hi Patrick, Thanks, with this info the improved .plist does its job. And with the KeepAlive key launchd restarts virtuoso on process terminations.
Now the: $ sudo launchctl stop com.openlinksw.vos # stops (and auto restarts) the server $ sudo launchctl remove com.openlinksw.vos # stops the server and keeps it stopped. and $ sudo launchctl load -w /Library/LaunchDaemons/com.openlinksw.vos # (re)starts the service after issuing the remove. The only drawback is that there seems to be no nice way to exit virtuoso. > SuccessfulExit [boolean] > If true, the job will be restarted as long as the program exits and with an > exit status of zero. If false, the job will be restarted in the inverse > condition. SuccessfulExit is set to false, so I would expect that virtuoso-t wouldn't be restarted with an exit status of zero. Or might it be that $ sudo launchctl stop com.openlinksw.vos doesn't return a 0 on quit? Not such a big deal to me, I can live with the (launchctl remove) workaround. Thanks again for your help, ~Ceriel Op 3 mrt 2010, om 01:45 heeft Patrick van Kleef het volgende geschreven: > HI Ceriel, > >> >> I have tried to launchctl start virtuoso-t appended with the -f parameter: >> >> <dict> >> <key>Disabled</key> >> <false/> >> <key>UserName</key> >> <string>root</string> >> <key>GroupName</key> >> <string>wheel</string> >> <key>Label</key> >> <string>com.openlinksw.vos</string> >> <key>Program</key> >> <string>/usr/local/virtuoso-opensource/bin/virtuoso-t</string> >> <key>ProgramArguments</key> >> <array> >> <string>-f</string> >> </array> >> <key>KeepAlive</key> >> <dict> >> <key>SuccessfulExit</key> >> <false/> >> </dict> >> <key>WorkingDirectory</key> >> <string>/usr/local/virtuoso-opensource/var/lib/virtuoso/db/</string> >> </dict> >> >> that didn't change the behaviour: > > > The problem is that the documentation talks about the ProgramArguments as > being the second parameter to the excecvp(3) function, which basically is an > ARGV[] array. This means that just like with a C program you need to specify > argv[0] as the program name. > > So a working launch control file is: > > <?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"> > <dict> > <key>Disabled</key> > <false/> > <key>UserName</key> > <string>root</string> > <key>GroupName</key> > <string>wheel</string> > <key>Label</key> > <string>com.openlinksw.vos6</string> > <key>Program</key> > <string>/usr/local/virtuoso-opensource/bin/virtuoso-t</string> > <key>ProgramArguments</key> > <array> > <string>virtuoso-t</string> > <string>-f</string> > </array> > <key>KeepAlive</key> > <dict> > <key>SuccessfulExit</key> > <false/> > </dict> > <key>WorkingDirectory</key> > <string>/usr/local/virtuoso-opensource/database</string> > </dict> > > > Note that since you are installing vos in /usr/local/virtuoso-opensource, i > recommend you use: > > ./configure --prefix=/usr/local/virtuoso-opensource > --with-layout=openlink .... > > > this will create a much easier directory structure like: > > /usr/local/virtuoso-opensource > /bin > /lib > /hosting > /database > > rather than the Linux File System Layout that a default installation would > use. > > > Patrick
