Skip to content

Commit 7fe28f8

Browse files
committed
Add code for deleteing ftps tokens
1 parent 410e2e1 commit 7fe28f8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

getssl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,6 +1538,20 @@ for d in "${alldomains[@]}"; do
15381538
cd $ftplocn
15391539
delete ${token:?}
15401540
EOF
1541+
elif [[ "${t_loc:0:6}" == "ftpes:" ]] || [[ "${t_loc:0:5}" == "ftps:" ]] ; then
1542+
debug "using ftp to delete the file from $from"
1543+
ftpuser=$(echo "${t_loc}"| awk -F: '{print $2}')
1544+
ftppass=$(echo "${t_loc}"| awk -F: '{print $3}')
1545+
ftphost=$(echo "${t_loc}"| awk -F: '{print $4}')
1546+
ftplocn=$(echo "${t_loc}"| awk -F: '{print $5}')
1547+
debug "ftp user=$ftpuser - pass=$ftppass - host=$ftphost file=${ftplocnn/${token:?}"
1548+
if [[ "${to:0:5}" == "ftps:" ]] ; then
1549+
# shellcheck disable=SC2086
1550+
curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" --silent -Q "DELE ${token:?}}" "ftp://${ftphost}${ftplocn}:990/"
1551+
else
1552+
# shellcheck disable=SC2086
1553+
curl ${_NOMETER} $FTPS_OPTIONS --ftp-ssl --ftp-ssl-reqd -u "${ftpuser}:${ftppass}" --silent -Q "DELE ${token:?}" "ftp://${ftphost}${ftplocn}/"
1554+
fi
15411555
else
15421556
rm -f "${t_loc:?}/${token:?}"
15431557
fi

0 commit comments

Comments
 (0)