File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -943,14 +943,16 @@ backup_sqlite3() {
943943
944944check_availability() {
945945 if var_true "${DEBUG_CHECK_AVAILABILITY}" ; then debug on; fi
946- ### Set the Database Type
947946 if var_false "${backup_job_skip_availability_check}" ; then
948947 case "${dbtype}" in
949948 "couch" )
950949 counter=0
951950 code_received=0
951+ if [ -n "${backup_job_db_user}" ] && [ -n ${backup_job_db_pass} ]; then
952+ _ca_couch_auth="-u ${backup_job_db_user}:${backup_job_db_pass}"
953+ fi
952954 while [ "${code_received}" != "200" ]; do
953- code_received=$(run_as_user curl -XGET -sSL -o /dev/null -L -w ''%{http_code}'' ${backup_job_db_host}:${backup_job_db_port})
955+ code_received=$(run_as_user curl -XGET -sSL -o /dev/null -L -w ''%{http_code}'' ${_ca_couch_auth} ${ backup_job_db_host}:${backup_job_db_port})
954956 if [ "${code_received}" = "200" ] ; then break ; fi
955957 sleep 5
956958 (( counter+=5 ))
You can’t perform that action at this time.
0 commit comments