Browse Source

Add code for deleteing ftps tokens

pull/841/head
Timothe Litt 2 years ago
parent
commit
def924c717
Failed to extract signature
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      getssl

+ 14
- 0
getssl View File

@ -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


Loading…
Cancel
Save