fixed missing fi
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-05-27 07:19:59 +02:00
parent 7f06058b44
commit e7738b1a71

View File

@@ -60,6 +60,7 @@ rm ~/$BACKUP_FILENAME
echo "uploading"
if [ "$USE_SFTP" -eq 1 ]; then
echo "use sftp"
cd ~/
sshpass -e sftp -oBatchMode=no ${SFTP_EXTRA} -b - ${SFTP_USER}@${SFTP_HOST} << !
cd ${SFTP_PATH}
@@ -68,7 +69,7 @@ if [ "$USE_SFTP" -eq 1 ]; then
!
if [ "$month_day" -eq 1 ] ; then
echo "make monthly backup"
sshpass -e sftp -oBatchMode=no ${SFTP_EXTRA} -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
@@ -97,4 +98,5 @@ else
aws ${AWS_ENDPOINT_OPTIOM} s3 cp s3://$S3_BUCKET_NAME/$BACKUP_FILENAME.gpg s3://$S3_BUCKET_NAME/$BACKUP_FILENAME_MONTHLY.gpg --storage-class DEEP_ARCHIVE || healthchck_fail "failed to create monthly backup"
fi
fi
fi
healthchck_ok "Success"