ftp upload script

Maik Holtkamp s-y-l at gmx.net
Sun Nov 25 12:49:03 CET 2001


Hallo zusammen,

ich würde gerne beim online gehen per ftp eine Seite hochladen, in
der meine aktuelle IP steht. Mit dyndns komme ich nicht kar, da ich
DoD habe und bevor der Name im DNS rum ist mein Server teilweise
schon wieder unten ist.

Das habe ich bisher gemacht:

---/root/.netrc---
machine <mein_hoster> login <username> password <geheim>
macdef init
cd meine_ip
send /var/ip/html/index.html index.html
bye
---/root/.netrc---

chmod 600 /root/.netrc

---/usr/local/sbin/ipsend---
#!/bin/sh
cat /var/ip/html/top.html > /var/ip/html/index.html
cat /var/meine_ip >> /var/ip/html/index.html
cat /var/ip/html/bottom.html >> /var/ip/html/index.html
ftp <mein_hoster>
---/usr/local/sbin/ipsend---

chmod 755 /usr/local/sbin/ipsend

---/etc/ppp/ip-up.local---
[...]
echo "$4" > /var/meine_ip 
/usr/local/sbin/ipsend >> /tmp/err.log 2>&1
[...]
---/etc/ppp/ip-up.local---

Wenn ich jetzt manuell ipsend aufrufe, geht alles wie gewünscht. 
Nur in der /tmp/err.log bekomme ich immer:

Login failed.

Warum?

ISDN, SuSE 7.1, 2.2.19

TIA.

CU
_Maik Holtkamp_

-- 
- maik



More information about the Linux mailing list