Hey,
also ich versuche gerade nach dieser Anleitung die Werte meines Temperatursensor auf meine Website zu bekommen. Allerdings scheitere ich bei dem Punkt mit dem Bash-Skript:
HOST='ftp_of_your_webserver'
USER='Your_username'
PASSWD='Your_password'
FOLDER='/webspace/httpdocs/pathtofolder'# Be sure to leave the following as it is. This will ensure that the filename of the log-file is correct.
logname=$(date +"%d-%m-%Y")
FILE="temp_log_$logname.txt"
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
cd $FOLDER
put $FILE
quit
END_SCRIPT
exit0
Alles anzeigen
Ausgefüllt habe ich folgendermaßen:
HOST='xxxxx.nitrado.net'
USER='xxxxx'
PASSWD='xxxxxxx'
FOLDER='/'
(Ich weiß das bringt jetzt nicht viel:D, aber ich war mir nicht sicher ob das Format beim ersten passt und ob ich das Hauptverzeichnis des FTPs so angebe...)
Naja wenn ich das so ausführe, kommt:
pi@raspberrypi ~ $ ./ftp.sh
: No address associated with hostname
Not connected.
Not connected.
Not connected.
Not connected.
?Invalid command
pi@raspberrypi ~ $
Wenn ich im Skript in Zeile 8 $Host durch [font="Courier 10 Pitch, Courier, monospace"]xxxxx.nitrado.net [/font]ersetze, kommt:
pi@raspberrypi ~ $ ./ftp.sh
Login authentication failed
You aren't logged in
: No such file or directory
?Invalid command
pi@raspberrypi ~ $
Wenn ich ftp in der Konsole mit:
pi@raspberrypi ~ $ ftp xxxxx.nitrado.net 21
starte dann kann ich mich einloggen und er stellt die verbindung her.
Was mache ich falsch?
MfG c3ntry