Scritping issue VPN

Discussion in 'Mac Programming' started by chiljon, Jan 30, 2009.

  1. macrumors newbie

    Jan 30, 2009
    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?
  2. macrumors 6502a

    Sep 3, 2005
    Cramlington, UK
    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

Share This Page