SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

myipsitestatus v 0.0.1 (hindu@captainmegabyte.com)

This is a set of bash scripts that maintain a status display for a dynamic IP (from http://www.myip.org).

They depend on the following:

xv (for the display of the site logo)
perl (for setmyip.pl)
bash (cuz the scripts are bash scripts) sed (for parsing strings to get your ip) ipconfig (to get the current ip address)

Most of these are standard in a Linux install. I am running Mandrake 6.1 and it worked right out of the box for me. I only have one ppp device set up, so the script is set to work with the ppp0 device. If you are using a different ppp device, edit getmyinet to return the proper interface info.

Run myipsitesetup.

It does the following:

  1. Copies scripts to /usr/local/bin
  2. Creates ~/.myipsitestatus directory and copies images

The contents are as follows:

getmyinet - Cheesy Bash Script(tm) for returning your ppp0 ip myipsitestatus - Cheesy Bash Script(tm) for checking status xmyipup - Cheesy Bash Script(tm) interface to setmyipup.pl xmyipdown - Cheesy Bash Script(tm) interface to unsetmyip.pl xsitestatus - Cheesy Bash Script(tm) to start up xv setmyip.pl - setMyip 0.1.2 (c) 1999, Eric Einhorn (outcast@monmouth.com) unsetmyip.pl - same as above, with a patch (see code for comments) sitelogo.jpg - site logo image (used for offline status) siteonline.jpg - site logo image (used for online status) sitestat.jpg - site logo image (displayed by xsitestatus)

Basically, xmyipup and xmyipdown call the setmyipup.pl and unsetmyipup.pl scripts, passing the ip returned by getmyinet as a parameter. On return from the perl scripts, a drop file (~/.myiponline) is created/destroyed and myipsitestatus is called to make sure the corrct status image is displayed.

What I have done is added xsitestatus to my X init script so it starts whenever X does. My display is running at 1024x768, and I placed the displayed image low and left. Modify xsitestatus (the geometry parameters for xv) to place yours accordingly.

I have my ppp dialup script executing xmyipup after it connects, and xmyipdown is run before logging off of ppp.

xmyipup and xmyipdown can be run from the command line also.

Thanks to:
http://www.myip.org for providing such a great service (FREE!) Eric Einhorn (outcast@monmouth.com) for setmyip.pl


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.