Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Start and stop a privileged service programmatically




On 10/lug/06, at 21:51, Markus Hitter wrote:


Am 10.07.2006 um 19:53 schrieb Nicola Vitacolonna:

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.

Nicola
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >Start and stop a privileged service programmatically (From: Nicola Vitacolonna <email@hidden>)
 >Re: Start and stop a privileged service programmatically (From: Dave Zarzycki <email@hidden>)
 >Re: Start and stop a privileged service programmatically (From: Nicola Vitacolonna <email@hidden>)
 >Re: Start and stop a privileged service programmatically (From: Markus Hitter <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.