Re: Start and stop a privileged service programmatically
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On 10/lug/06, at 21:51, Markus Hitter wrote: Am 10.07.2006 um 19:53 schrieb Nicola Vitacolonna: Nicola _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... My initial idea was to build a preference pane to turn the connection on and off. But, for some reason, I cannot make openvpn start up correctly from code. How about toggling the OnDemand flag in your preference As far as I can understand, if OnDemand is false the service runs continuously; if it is true, the service runs when needed. If it worked, I could simply set OnDemand to true, put my .plist file in / Library/LaunchDaemons and live happily. But, so far, I was not able to make this approach effective: openvpn changes the routing tables, so it should be started at least once, I guess (I have also tried the combination OnDemand=true and RunAtLoad=true, but it is the same as OnDemand=false, i.e. openvpn starts up and runs continuously). Setting OnDemand to true simply makes openvpn (the client) never start. I have read about the Sockets key, but it is not clear to me if that may help. Maybe it would be more appropriate to toggle the Disabled flag, but when would this change take effect? On restart? The best I was able to do so far is to put a .plist file in /Library/LaunchDaemons so that openvpn is launched at startup. This email sent to site_archiver@lists.apple.com
participants (1)
-
Nicola Vitacolonna