2020-06-16 20:57:50 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-10-18 18:06:25 -07:00
|
|
|
# user=$1
|
|
|
|
# pass=$2
|
|
|
|
# host=$3
|
|
|
|
# destination_folder=$4
|
|
|
|
# file_to_upload=$5
|
|
|
|
|
2020-06-16 20:57:50 -07:00
|
|
|
if [ ! "$1" ] || [ ! "$2" ] || [ ! "$3" ]; then
|
|
|
|
echo "No Secrets"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2021-10-08 22:41:17 -07:00
|
|
|
echo -e "\nUploading file: $5"
|
2020-06-16 20:57:50 -07:00
|
|
|
|
2021-10-18 18:06:25 -07:00
|
|
|
# ncftpput -r 999 -m -R -v -u "$1" -p "$2" "$3" $4 $5
|
|
|
|
|
2021-12-22 17:25:28 -08:00
|
|
|
pwd
|
2021-12-22 16:48:54 -08:00
|
|
|
ls -l $5
|
2021-12-22 17:31:44 -08:00
|
|
|
echo "put $5 $4" | sshpass -p $2 sftp -o StrictHostKeyChecking=no $1@$3
|