Let me suggest better techniques. I have used these a lot.
I presume you're trying to use an ip-poster. Of the many solutions available, 
here are the best I like:

1. You can go for something like dyndns to do this. (http://www.dyndns.org)
2. Get a free home page somewhere that offers ftp access. If you don't have 
the a script called ftp-put.sh, cut and paste it from below. Now add a line 
to your script /etc/ppp/ip-up or /etc/ppp/ip-up.local (preffered)reading 
something like this:
-------------snip------------------------------
ifconfig ppp0 | grep inet\  | tr -s " " | cut -d" " -f3 | cut -d":" -f2  > 
/tmp/ip

(please tweak the above till you get just the ip address...)

ftp-put.sh /dev/null ftp-hostname <directory-on-remote-m/c> currentip /tmp/ip 
<username> <password>

-----------------snip----------------------------

That's it. On your homepage, you can put a link to the 'currentip' file. Or 
you can mail yourself the ip if you like instead of ftp-ing it.  Personal 
preferance. I prefer the ftp method as it doesn't clutter my mailbox.  The 
advantage of this as compared to the crontab entry is that it's cleaner and 
you only get updates when the machine actually connects... I presume you have 
put in a times automatic dialer to connect you each hour...

There are more ways to achieve the above. The ftp thing is something I used 
to use until I came upon dynamic dns servers...

Here's the ftp-put.sh script I picked up from my machine - in case yours 
doesn't have it (It's absent on some installations)...
-----------------snip---------------------------
#!/bin/bash
# ftp-put.sh output_file host directory remote_file local_file user pass
ftp -n $2 > $1 2> $1 <<EOC
user $6 $7
binary
cd $3
put $5 $4
bye
EOC

------------------snip---------------------------

If you don't have this on your machine, just copy and dump this script say in 
/usr/bin or /usr/local/bin or something..


I know this doesn't really answer your question - that's a bit more difficult 
to answer without more information, but I hope you can use this instead as 
it's more efficient than getting a mail ech hour...

cheers,
-Faisal.


On Friday 27 April 2001 23:27, RATNAKAR KOLI wrote:
> I have setup my RH 6.2 to forward me the IP, for remote administration,
> where every hour i used to get an update in my mail box and it has been
> working perfectly for almost 1month.
>
> To do this i had hardly done not done any changes to the system, except,
> add a line to my cronjob which sends me a mail every hour at 01 minutes.
> The line reads:
>
> 01 * * * * /sbin/ifconfig ppp0|grep inet|mail [EMAIL PROTECTED]
>
> Also, nobody except me has the root access to it. If any other details
> needed pls let me know.
>
> Ratnakar
>
>
>
> Suresh Ramasubramanian <[EMAIL PROTECTED]> wrote:
>
> * RATNAKAR KOLI [linux-india] <27/04/01 12:38 +0200>:
> > I have configured my RH 6.2 system to forward me some mails every hour.
> > it
>
> was
>
> > working fine till 24/04/2001. 25/04/2001 being an holiday the server was
>
> not
>
> > used, since yesterday i.e. 26/04/2001, it has just stopped sending me my
> > mails, what could be wrong or rather how do i trouble shoot it. can u pls
> > assist me?
>
>  Look at the logs.  What did you do, set up a cronjob, run fetchmail as a
>  daemon etc?  Give further details first plz.

-- 
-====----====----====----====----====----====----====---
     ____
    /    \
"@'| '..` |`@"            L I N U X
/__| \__/ |__\    May the source be with you
    \__U_/

--------------------------------------------------------
DON'T PANIC!
                  -The Hitchhiker's Guide To The Galaxy.
-====----====----====----====----====----====----====---



----------------------------------------------
The mailing list archives are available at
http://lists.linux-india.org/cgi-bin/wilma/linux-india-help

Reply via email to