Rocketeer
November 2nd, 2006, 02:41 AM
Hello,
I finished this script some time ago, but it seemd not to work.
It's target is to check a directory if it has files in it (and subdirectories) and then upload each file by ftp over the internet (at 2am).
Last night was the first live test, but it failed. After two files, the script stopped uploading and I don't know where the error is (i do logs nows)
However, due to the fact this seems to be a simple job, which certainly has been done by a lot of people, I would like to see professional solutions.
Here's the short script:
#!/bin/sh
cd /home/user/g2upload/
ftp -i -n hochlager.ch <<EOT
user user@somedomain.ch password
lcd /home/user/g2upload/
mput *
quit
EOT
rm /home/user/g2upload/*
I finished this script some time ago, but it seemd not to work.
It's target is to check a directory if it has files in it (and subdirectories) and then upload each file by ftp over the internet (at 2am).
Last night was the first live test, but it failed. After two files, the script stopped uploading and I don't know where the error is (i do logs nows)
However, due to the fact this seems to be a simple job, which certainly has been done by a lot of people, I would like to see professional solutions.
Here's the short script:
#!/bin/sh
cd /home/user/g2upload/
ftp -i -n hochlager.ch <<EOT
user user@somedomain.ch password
lcd /home/user/g2upload/
mput *
quit
EOT
rm /home/user/g2upload/*