Hi Phil...
It might, but I can't get it to work.
If you try this (on OS X):
1. create a folder called "revcoder_rsync_test" in the root directory
of your main hard drive
2. open Terminal
3. enter this:
rsync -avzrt [EMAIL PROTECTED]:/home/revcoder/public_html/
revcoder_rsync_test/ /revcoder_rsync_test
4. you will see the following (the first time you connect):
The authenticity of host 'revcoders.org (67.19.54.130)' can't be
established.
RSA key fingerprint is 9f:8c:ba:a9:5d:3f:b4:ef:f7:4a:2c:20:cd:77:b3:8c.
Are you sure you want to continue connecting (yes/no)?
5. enter "yes"
6. response:
Warning: Permanently added 'revcoders.org' (RSA) to the list of known
hosts.
[EMAIL PROTECTED]'s password:
7. enter "cookies"
8. Then, a couple of small pictures will download. Success!
OK, so all works well in Terminal.
Now, in Revolution:
put "/bin/bash" into tProc
open process tProc FOR update
write "rsync -avzrt [EMAIL PROTECTED]:/home/revcoder/
public_html/revcoder_rsync_test/ /revcoder_rsync_test" to process tProc
wait 2 seconds WITH messages
write "cookies" to process tProc
Nothing happens.
I have tried "read from process tProc until empty" after both write
commands, with no data.
??!!?
On May 16, 2008, at 1:43 PM, Phil Davis wrote:
Josh -
Will it work by doing what Mark Smith mentioned on 4/25/08? (below)
Another option is to open "/bin/bash" as a process, so you can then
read and write to it as if it were the 'terminal' app.
best,
Mark
Phil Davis
Josh Mellicker wrote:
Thanks for the detailed example, but apparently rsync won't accept
a password this way or I just don't get it (or both :-)
So here's where I'm stuck:
In Terminal, you:
1. issue the rsync command
2. then, at the next prompt, you are asked for the server password.
Typing this and pressing enter starts the rsyncing.
I cannot figure out how to respond to this second prompt with
either "shell" or "open process-write to process".
I have tried to implement this solution:
http://www.sakana.fr/blog/2008/05/07/securing-automated-rsync-over-ssh/
for being able to automate rsync by setting up a secure an SSH key
pair, so I don't need a password, but this too is beyond my
capabilities.
Again, I would gladly finance the effort of creating a test stack
and share it, I think many developers would enjoy Rev working with
rsync.
On May 16, 2008, at 4:54 AM, Sarah Reichelt wrote:
As an example, if I want to get a detailed directory listing in
Terminal, I use: ls -la
In Rev, I would use: put shell("ls -la") into fld "Listing"
But what if I need to look into a locked directory, one that in
terminal I'd
use sudo ls -la ? How do I pass the command and the password. In
Terminal I
always do the sudo + command, it then asks for my password which
I enter.
How do I do these 2 steps in Rev?
Here is the way I do it:
-- specify the shell command to use
put "ls -la" into tCmd
-- build the series of shell commands to sudo this
put "#!/bin/sh" & cr into tScript
put "pw=" & quote & tPass & quote & cr after tScript
put "echo $pw | sudo -S " & tCmd & cr after tScript
-- do the complete shell command
put shell(tScript) into tCheck -- do the command & get the result
You can either ask for the password each time, or store it in a
custom
property or global for future reference.
Cheers,
Sarah
--
Phil Davis
PDS Labs
Professional Software Development
http://pdslabs.net
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution