[lug] Auto FTP file up on PPP connection
Chip Atkinson
catkinson at circadence.com
Thu May 17 09:10:23 MDT 2001
I'd set up ppp for demand dial. Then you don't have to worry about
timing so much. With demand dialing you just ftp to the site and ftp
hangs while the connection is brought up. Once the connection is
established it behaves like normal ftp.
To automate the ftp process use autoexpect and expect. Expect is kind
of tricky at first, so autoexpect is your friend. Start up autoexpect
and start your ftp session. Then when you are done with the ftp, type
in exit. Autoexpect will tell you what the script is named. You will
almost certainly have to edit the resulting script because autoexpect
writes the expect script to expect exactly what it recieves. This is
typically a problem because many logins say "last login at ...." which
is different each time.
I have written a pair of scripts, one shell, one expect that connects to
my isp and downloads the mail. I can send that this evening if you wish.
Chip
Mark (Andy) Jolley wrote:
> I'm trying to get my dialup box to auto FTP a file to a server once the PPP
> connection is up, so I actually have two questions (I'm on Red hat 7.0):
> 1) where do I add my script to make my scripts kick off upon a successful
> dialup and logon? I looked at my ppp-up script in the /etc/ppp directory,
> but it said to use a ppp-up.local. I couldn't find one, so I made one with
> 755 permissions, and added a line to call my scripts. But nothing happens.
> My file creation script also has 755 permissions.
>
> 2) how do I automate the ftp process. I'm more familiar with the M$ world
> and I can call a script with ftp -s filename to automate an FTP process, how
> do I do this with Linux, and who is the user that it will run under?
>
> Thanks
> Mark (Andy) Jolley
>
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
More information about the LUG
mailing list