VServer and launchd

Charles Yeomans charles at declareSub.com
Mon Nov 13 17:52:12 CST 2006


On Nov 13, 2006, at 5:22 PM, Ruslan Zasukhin wrote:

> On 11/14/06 12:12 AM, "Charles Yeomans" <charles at declareSub.com>  
> wrote:
>
>> It is quite simple; I use launchd to manage some other server
>> applications.  Essentially, you install VServer_Office as usual, and
>> install a .plist file in /Library/LaunchDaemons.  Here is the one I'm
>> using for testing.
>>
>> <?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>com.desuetude.vserver</string>
>>          <key>OnDemand</key>
>>          <false/>
>>          <key>ProgramArguments</key>
>>          <array>
>>                  <string>/Library/VServer_Office/VServer_Office.app/
>> Contents/MacOS/VServer_Office</string>
>>          </array>
>> </dict>
>> </plist>
>>
>> Once installed, you use launchctl to administrate.  Much better than
>> rebooting the machine to restart :)  I don't know how one sets up an
>> installer, but someone has already done it.
>
> Great, so using above plist you can run vserver with launchd and it  
> works?
>
> Just great :)
>
> I will try tomorrow


Actually I am having some trouble testing because the interface for  
VDatabase has changed, and the documentation for VConnection is  
unintelligible (bug #1984).  I looked at an example project, but it  
didn't compile because the code has not been updated (bug #1983).   
But I have a VServer process running on my computer.  Here are the  
steps to follow.


1.  Install VServer_Office in /Library.

2. Create a .plist file in /Library/LaunchDaemons; call it, say,  
com.paradigmasoft.vserver.plist and add the XML above.  Feel free  
substitute 'paradigmasoft' for 'desuetude'.

3.  Open a Terminal window and execute the following commands.

sudo launchctl load /Library/LaunchDaemons/ 
com.paradigmasoft.vserver.plist
sudo launchctl start com.paradigmasoft.vserve  -- the value of the  
Label key in XML above

Check using

sudo launchctl list

to see if com.paradigmasoft.vserve is listed.  And you can use ps or  
top to look for a VServer process.

If this doesn't work, come to the US and try it again on my computer.

Charles Yeomans


More information about the Valentina mailing list