|
|
@ -1608,22 +1608,21 @@ for d in "${alldomains[@]}"; do |
|
|
# shellcheck disable=SC2086 |
|
|
# shellcheck disable=SC2086 |
|
|
curl ${_NOMETER} -u "${davsuser}:${davspass}" -X "DELETE" "https://${davshost}:${davsport}${davsdirn}${davsfile}" |
|
|
curl ${_NOMETER} -u "${davsuser}:${davspass}" -X "DELETE" "https://${davshost}:${davsport}${davsdirn}${davsfile}" |
|
|
elif [[ "${t_loc:0:6}" == "ftpes:" ]] || [[ "${t_loc:0:5}" == "ftps:" ]] ; then |
|
|
elif [[ "${t_loc:0:6}" == "ftpes:" ]] || [[ "${t_loc:0:5}" == "ftps:" ]] ; then |
|
|
if [ -n "$FTP_PORT" ]; then SFTP_PORT=":${FTP_PORT}"; fi |
|
|
|
|
|
|
|
|
# FTPES (FTP over explicit TLS/SSL, port 21) and FTPS (FTP over implicit TLS/SSL, port 990). |
|
|
debug "using ftp to delete the file from $from" |
|
|
debug "using ftp to delete the file from $from" |
|
|
ftpuser=$(echo "${t_loc}"| awk -F: '{print $2}') |
|
|
ftpuser=$(echo "${t_loc}"| awk -F: '{print $2}') |
|
|
ftppass=$(echo "${t_loc}"| awk -F: '{print $3}') |
|
|
ftppass=$(echo "${t_loc}"| awk -F: '{print $3}') |
|
|
ftphost=$(echo "${t_loc}"| awk -F: '{print $4}') |
|
|
ftphost=$(echo "${t_loc}"| awk -F: '{print $4}') |
|
|
ftplocn=$(echo "${t_loc}"| awk -F: '{print $5}') |
|
|
ftplocn=$(echo "${t_loc}"| awk -F: '{print $5}') |
|
|
SFTP_PORT="" |
|
|
|
|
|
if [ -z "$FTP_PORT" ]; then |
|
|
|
|
|
SFTP_PORT=":990" |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ -n "$FTP_PORT" ]; then SFTP_PORT=":${FTP_PORT}"; else SFTP_PORT=""; fi |
|
|
debug "ftp user=$ftpuser - pass=$ftppass - host=$ftphost file=${ftplocn}/${token:?}" |
|
|
debug "ftp user=$ftpuser - pass=$ftppass - host=$ftphost file=${ftplocn}/${token:?}" |
|
|
if [[ "${to:0:5}" == "ftps:" ]] ; then |
|
|
if [[ "${to:0:5}" == "ftps:" ]] ; then |
|
|
# shellcheck disable=SC2086 |
|
|
|
|
|
|
|
|
[ -z "$FTP_PORT" ] && SFTP_PORT=":990" |
|
|
|
|
|
# shellcheck disable=SC2086 |
|
|
curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" --silent -Q "DELE ${token:?}}" "ftp://${ftphost}${SFTP_PORT}/${ftplocn}/" |
|
|
curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" --silent -Q "DELE ${token:?}}" "ftp://${ftphost}${SFTP_PORT}/${ftplocn}/" |
|
|
else |
|
|
else |
|
|
# shellcheck disable=SC2086 |
|
|
|
|
|
|
|
|
# shellcheck disable=SC2086 |
|
|
curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" --silent -Q "DELE ${token:?}" "ftp://${ftphost}${SFTP_PORT}/${ftplocn}/" |
|
|
curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" --silent -Q "DELE ${token:?}" "ftp://${ftphost}${SFTP_PORT}/${ftplocn}/" |
|
|
fi |
|
|
fi |
|
|
else |
|
|
else |
|
|
|