PDA

View Full Version : Scritping issue VPN




chiljon
Jan 30, 2009, 03:53 AM
Hi programmers,

I have an issue with creating a script to restart VPN services
This is the command line:
sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart

When i trow this in the terminal it works fine.
But i want to create an app. from this.
I used Platypus-4.0 and Automator but both failed with this command:

do shell script "sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart" password "password" with administrator priveleges
I dont care if its Platypus or Automator

Can some one help me please?



lazydog
Jan 30, 2009, 10:17 AM
You could try turning it into a shell script and set uid on it. This will run the script as root when it's run.

b e n