pppd
Pavlos Parissis
p_pavlos at otenet.gr
Fri Nov 23 15:52:01 EET 2001
Hello all,
Thelw kathe fora pou enas server kanei sindesh sto ISP kai pernei mia Dynamic IP
na thn stelnei se ena mail address.
O server trexei qmail etsi eftiaksa to parakatw script sendip:
#####################
IP="`internetip`"
(cat<<EOF
From: root
To: surferpaul at yahoo.com
Subject: INternetIP of server
INternetip: $IP
EOF
)|/usr/sbin/sendmail -oi -t
######################
H command internetip mou deixnei th IP mou trexontas
/sbin/ifconfig ppp0 | grep inet | cut -d : -f 2 | cut -d \ -f 1
to script doulevei mia xara to provlima einai oti to vazw sto /etc/ppp/ppp-on na trexei
to sendip script,to opoio stelnei to mail alla xwris thn IP apla stelnei ena empty string.
Diavazontas to manual to pppd den vrika pou akrivws prepei na to valw na trexei to script
afto.
To evala kai sta /etc/sysconfig/network-scripts/ alla tipota.
Skeftika na ftiaksw ena script pou tha trexei me cron daemon to opoio
tha tsekari an exei allaksei h internet IP kai an ontos exei allaksei na stelnei mail.
Alla lew re gamoto den mporei na mhn iparxei tropos mesa apo kapoia options 'h command.
Den eimai o prwtos pou tha thelei na kanei kati tetoio ara kapou tha iparxei san epilogh
alla distixws den vrika kati.
Exei kaneis kamia idea?
More information about the Linux-greek-users
mailing list