added extra parameter for sftp
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-05-27 06:51:04 +02:00
parent 5626dc78e6
commit 841f35ca06

View File

@@ -61,14 +61,14 @@ rm ~/$BACKUP_FILENAME
echo "uploading"
if [ "$USE_SFTP" -eq 1 ]; then
cd ~/
sshpass -e sftp -oBatchMode=no -b - ${SFTP_USER}@${SFTP_HOST} << !
sshpass -e sftp -oBatchMode=no ${SFTP_EXTRA} -b - ${SFTP_USER}@${SFTP_HOST} << !
cd ${SFTP_PATH}
put ${BACKUP_FILENAME}.gpg
bye
!
if [ "$month_day" -eq 1 ] ; then
echo "make monthly backup"
sshpass -e sftp -oBatchMode=no -b - ${SFTP_USER}@${SFTP_HOST} << !
sshpass -e sftp -oBatchMode=no ${SFTP_EXTRA} -b - ${SFTP_USER}@${SFTP_HOST} << !
cd ${SFTP_PATH}
cp ${BACKUP_FILENAME}.gpg ${BACKUP_FILENAME_MONTHLY}.gpg
bye