> Sometime ago I had a program for OS/2 that would automatically find
> and ftp my current IP address to a web page hosted at my ISP. If I
> was on line any visitor could click on that link and connect with my
> server. The program was called "Poor Man's Web Server". It was a
> simple REXX script that just found and ftped the dynamic IP. I used an
> native OS/2 web server at that time.
> I have since moved onto Linux and I am wondering if there is such a
> program or method for Linux with Apache?
Method, method, of course... Everything is ready, no need for special
program :). It can be done in a variety of ways. Also it has nothing to
do with apache per se. Here what I am doing (I admit that it's rather
quick and dirty than error-prone...):
file /etc/ppp/ip-up:
#!/bin/sh
STATUS_FILE = /etc/ppp/status.html
/usr/local/sbin/gen-status.pl -v -s up -f $STATUS_FILE -i $4
if [ $? -eq 1 ]; then
/usr/local/sbin/batchftp <ISP_site> $STATUS_FILE status.html
fi
file /usr/local/sbin/ppp-off:
#!/bin/sh
STATUS_FILE=/etc/ppp/staus.html
/usr/local/sbin/gen-status.pl -v -s down -f $STATUS_FILE
if [ $? -eq 1 ]; then
/usr/local/sbin/batchftp <ISP_site> $STATUS_FILE status.html
fi
... and then usual ppp-off stuff...
file /usr/local/sbin/batchftp:
#!/bin/sh
if [ $# -lt 3]; then
echo Usage: $0 ftp.site.com local/file/name remote/file/name
exit -1
fi
/bin/ftp -n -v $1 << EOF
user <user_name> <password>
ascii
put $2 $3
bye
EOF
and gen-status.pl is a perl script which format a small HTML page with
ip address supplied as parameter.
Hope this helps.
--
Pasha Zusmanovich -------o x x "What i tell you three times is true."
www.actcom.co.il/~pasha x x o---------------------------------------