diff options
Diffstat (limited to 'yarns/900-implements.yarn')
-rw-r--r-- | yarns/900-implements.yarn | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn index f08baee..57f52aa 100644 --- a/yarns/900-implements.yarn +++ b/yarns/900-implements.yarn @@ -61,6 +61,21 @@ exit code for later inspection. echo $? > "$DATADIR/exit" fi +## Access server over SFTP + +Put and get a file over SFTP. + + IMPLEMENTS THEN server allows SFTP + . "$DATADIR/config.sh" + echo test.file > "$DATADIR/sftp.file" + cat > "$DATADIR/sftp.commands" << EOF + put $DATADIR/sftp.file sftp.file + get sftp.file $DATADIR/sftp.file.copy + rm sftp.file + EOF + sftp -b "$DATADIR/sftp.commands" "$ACCOUNT@$SERVER" + cmp "$DATADIR/sftp.file" "$DATADIR/sftp.file.copy" + ## Inspect results of running a command The stdout, stderr, and exit code have been saved. Inspect them. |