On Mon, 18 Dec 2000, Johnathan Smith wrote:

> Please help with redhat script
> 
> I am using redhat 7.0 and I would like to find out how
> to write a script that I could run in cron.
> 
> I need the script to get my ip address and then email
> it to me.
> 
> This will have me login to my home computer from work.
> 
> please email me at [EMAIL PROTECTED] if you could help
> 

put the following command in /etc/ppp/ip-up.local

ifconfig ppp0 | grep 'inet addr' | awk -F: '{ print $2 } ' | awk '{ print
$1 } ' | mail -s 'ip address' [EMAIL PROTECTED]

of course you will need to change the email address, and maybe the ppp
adapter (if you are not using ppp0).

a better way to do it though would be to use something like dyndns, which
when you dial in will point a "dynamic" hostname to your current ip
address.

try looking at dyndns.org. there's others around, but I can't remember
where...

chris.



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to