• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Way to run AS on PPP connect/VPN connect?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Way to run AS on PPP connect/VPN connect?


  • Subject: Re: Way to run AS on PPP connect/VPN connect?
  • From: Graff <email@hidden>
  • Date: Sat, 13 Dec 2003 02:49:54 -0500

There is a way to run a shell script whenever a PPP connection is made. You need to create a file in the /etc/ppp/ directory. A file in that location named ip-up will get executed when your PPP connection is made and a file named ip-down will get executed when the connection goes down.

Here's more information on this topic:
<http://www.macosxhints.com/article.php?story=20011125025933762>

I don't know of any other way to launch a shell script or AppleScript directly. What you could do is to have an AppleScript running in the background which is checking your connection every so often through an idle loop. If it finds that a new connection has started then it could do something.

Your best option is to use a program that manages locations for you. I've heard good things about Location X. It basically does everything that the Location control panel did in Mac OS 9 and more since it will change printers, sound volume, launch AppleScripts and shell scripts, and more when a connection is made . You can try it out for free and the full version is only $20. Check it out here:
<http://homepage.mac.com/locationmanager/>

On Dec 13, 2003, at 1:49 AM, Jim Witte wrote:

How could I run a script whenever I connect PPP or VPN (short of making a script to do the connection for me) that would set the outgoing mail server depending on which connection is active (I'd think you could do this already, with Locations - maybe you can..). I figure writing the correct outgoing server to some Mail plist would be quite easy if Mail doesn't have an AS command to do it itself, but getting the script to run on connection..
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Way to run AS on PPP connect/VPN connect? (From: Jim Witte <email@hidden>)

  • Prev by Date: Problem with folder action
  • Next by Date: Re: Reading a file as it fills up by another program
  • Previous by thread: Way to run AS on PPP connect/VPN connect?
  • Next by thread: Running script on sleep/wake / VPN reconnect
  • Index(es):
    • Date
    • Thread