[Israel.pm] web-based script
Shlomo Yona
shlomo at cs.haifa.ac.il
Tue Aug 31 02:19:21 PDT 2004
Hello,
I have the following task that I now do manually using a web
browser, a shell prompt, unison (files/dirs
synchronization), ssh and sftp:
[in the browser]
* goto url x.y.z
* login (username+password) [1]
<new page>
* select a radio button
* select another radio button
* hit submit
<wait for a download of a HUGE (over 100 mg) file>
[in the shell prompt]
* run a script on the downloaded file
<new file produced>
* copy the new file to some directory
* synchronize the directory with its mirror on another server
* run another script that compiles something out of the file
<after a few hours of processing a new file is created>
* sftp the file to server A
* ssh to server C
* ssh from C to server B
* sftp from server B to server A and get the new file
* chmod the file on server B as it should be
DONE
Can you please give me skeleton code for any of the tasks?
I see here:
session to handle (pose as a browser)
doing stuff locally (that's easy... I already know this)
synchronization in batch mode (how?!)
transfer of the file by a chain of ssh and sftp [2]
Help?!
[1] the login seems to be a simple apache based auth
[2] this is tricky: For some security reason, server B
doesn't accept logins from anywhere but server C, so server
C must first be contacted. Then one needs to login to server
B. Moreover, server B doesn't accept any sftp calls, so one
must sftp from B to any other server to get files. Server C
doesn't have enough quota to relay the file, so server A
must be also used...
--
Shlomo Yona
shlomo at cs.haifa.ac.il
http://cs.haifa.ac.il/~shlomo/
More information about the Perl
mailing list