Merge branch 'master' into vesta-ipv6-support

This commit is contained in:
Made I.T 2017-09-11 23:40:34 +02:00 committed by GitHub
commit 9d0a012160
94 changed files with 3174 additions and 263 deletions

View file

@ -63,7 +63,11 @@ ftp_download() {
if [ -z "$PORT" ]; then
PORT='21'
fi
ftpc "cd $BPATH" "get $1"
if [ -z $BPATH ]; then
ftpc "get $1"
else
ftpc "cd $BPATH" "get $1"
fi
}
# sftp command function
@ -100,8 +104,6 @@ sftpc() {
set arg [lindex \$argv \$count]
send "\$arg\r"
incr count
} else {
incr count
} else {
send "exit\r"
set output "Disconnected."
@ -132,7 +134,11 @@ sftp_download() {
PORT='22'
fi
cd $BACKUP
sftpc "cd $BPATH" "get $1" > /dev/null 2>&1
if [ -z $BPATH ]; then
sftpc "get $1" > /dev/null 2>&1
else
sftpc "cd $BPATH" "get $1" > /dev/null 2>&1
fi
}