In Xcode on Lion I’m attempting to manage the Web Service programatically. Simply, I want to be able to start, restart and stop the service from via my own buttons.
I suspect that the System Preferences or perhaps even the Sharing Preferences offer some kind of functionality to do so?
Any help is appreciated.
Are you taking about “Web Sharing”, i.e. the apache web server? You can certainly control it in the System Preferences. However, if you want to control it programmatically, you can use
apachectljust like on any unix server. So, for example