diff --git a/getssl b/getssl index d3d8059..41ccf79 100755 --- a/getssl +++ b/getssl @@ -1548,6 +1548,20 @@ for d in "${alldomains[@]}"; do cd $ftplocn delete ${token:?} EOF + elif [[ "${t_loc:0:6}" == "ftpes:" ]] || [[ "${t_loc:0:5}" == "ftps:" ]] ; then + debug "using ftp to delete the file from $from" + ftpuser=$(echo "${t_loc}"| awk -F: '{print $2}') + ftppass=$(echo "${t_loc}"| awk -F: '{print $3}') + ftphost=$(echo "${t_loc}"| awk -F: '{print $4}') + ftplocn=$(echo "${t_loc}"| awk -F: '{print $5}') + debug "ftp user=$ftpuser - pass=$ftppass - host=$ftphost file=${ftplocnn/${token:?}" + if [[ "${to:0:5}" == "ftps:" ]] ; then + # shellcheck disable=SC2086 + curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" --silent -Q "DELE ${token:?}}" "ftp://${ftphost}${ftplocn}:990/" + else + # shellcheck disable=SC2086 + curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" --silent -Q "DELE ${token:?}" "ftp://${ftphost}${ftplocn}/" + fi else rm -f "${t_loc:?}/${token:?}" fi