Re: Start and stop a privileged service programmatically
Re: Start and stop a privileged service programmatically
- Subject: Re: Start and stop a privileged service programmatically
- From: Nicola Vitacolonna <email@hidden>
- Date: Wed, 12 Jul 2006 18:29:26 +0200
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:
This email sent to email@hidden