diff --git a/scripts/upload.sh b/scripts/upload.sh index 7bb49d0e..df11107e 100644 --- a/scripts/upload.sh +++ b/scripts/upload.sh @@ -43,9 +43,14 @@ file_mode= dir_mode= file_owner= file_group= +ssh_identity= test -f $CFG_FILE && . $CFG_FILE +if [ -n "$ssh_identity" ]; then + CFG_IDENTITY="-i $ssh_identity" +fi + usage() { cat << EOT @@ -86,6 +91,7 @@ cat << EOT dir_mode="$dir_mode" file_owner="$file_owner" file_group="$file_group" + ssh_identity="$ssh_identity" Options: @@ -117,7 +123,9 @@ parse_target() if [ -n "$PASSWD" ]; then echo passwd="\"$PASSWD\";" if [ -f "$PASSWD" ]; then - echo IDENTITY="\"-i $PASSWD\"" + echo IDENTITY="\"-i $PASSWD\";" + else + echo IDENTITY="\"$CFG_IDENTITY\";" fi echo pw_ftp="\"$PASSWD\";" echo pw_scp="\"$PASSWD\";"