move rsync flag --compress to ssh section. It will be used only if de… (#159)
* move rsync flag --compress to ssh section. It will be used only if destination is accessed via ssh * fix identation, use tabs only
This commit is contained in:
+3
-1
@@ -227,7 +227,7 @@ AUTO_DELETE_LOG="1"
|
|||||||
EXPIRATION_STRATEGY="1:1 30:7 365:30"
|
EXPIRATION_STRATEGY="1:1 30:7 365:30"
|
||||||
AUTO_EXPIRE="1"
|
AUTO_EXPIRE="1"
|
||||||
|
|
||||||
RSYNC_FLAGS="-D --compress --numeric-ids --links --hard-links --one-file-system --itemize-changes --times --recursive --perms --owner --group --stats --human-readable"
|
RSYNC_FLAGS="-D --numeric-ids --links --hard-links --one-file-system --itemize-changes --times --recursive --perms --owner --group --stats --human-readable"
|
||||||
|
|
||||||
while :; do
|
while :; do
|
||||||
case $1 in
|
case $1 in
|
||||||
@@ -246,6 +246,7 @@ while :; do
|
|||||||
--rsync-get-flags)
|
--rsync-get-flags)
|
||||||
shift
|
shift
|
||||||
echo $RSYNC_FLAGS
|
echo $RSYNC_FLAGS
|
||||||
|
echo "if using remote drive over SSH, --compress will be added"
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
--rsync-set-flags)
|
--rsync-set-flags)
|
||||||
@@ -463,6 +464,7 @@ while : ; do
|
|||||||
|
|
||||||
CMD="rsync"
|
CMD="rsync"
|
||||||
if [ -n "$SSH_CMD" ]; then
|
if [ -n "$SSH_CMD" ]; then
|
||||||
|
$RSYNC_FLAGS="$RSYNC_FLAGS --compress"
|
||||||
if [ -n "$ID_RSA" ] ; then
|
if [ -n "$ID_RSA" ] ; then
|
||||||
CMD="$CMD -e 'ssh -p $SSH_PORT -i $ID_RSA -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'"
|
CMD="$CMD -e 'ssh -p $SSH_PORT -i $ID_RSA -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user