[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

where are ftp error messages logged?



Hello,
I've written a shell script that creates a file, then uploads it to my
ISP's server via (command-line) ftp.

After getting it to work from the (bash) command-line, I put it in
/etc/ppp/ip-up.d, so it would update this file every time my ppp link
goes up.

When run automatically (for example I run "pon"), it manages to write
the file on my (local) system, but the (scripted) ftp session fails,
and the file is not uploaded.

Here is a snippet of my script which contains the code for the ftp
session:

# setup networking defaults
/bin/cp /home/someuser/somefile/ ~/.netrc

# begin ftp session to upload file
/usr/bin/ftp -v -i home.myisp.com <<EOI
put /var/www/somefilehere www/somefilethere
quit

EOI

Why would this work from the (bash) command line, but not from
/etc/init.d/ip-up.d?  BTW, I've tried with #!/bin/sh and
#!/bin/bash.

Thanks.
-- 
David Karlin
mailto:dkarlin@coloradomtn.edu
http://funk48.home.travelin.com
Powered by Debian GNU/Linux 2.1


Reply to: