From 6b0884cd28bc69804fd8acbc3a7d39c4a010ba02 Mon Sep 17 00:00:00 2001 From: andrewheberle Date: Thu, 6 Jun 2019 23:27:30 +0800 Subject: [PATCH] Get rid of pasted garbage --- deploy/sophosxg.sh | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/deploy/sophosxg.sh b/deploy/sophosxg.sh index 2b86ee61..2cce5c01 100644 --- a/deploy/sophosxg.sh +++ b/deploy/sophosxg.sh @@ -162,38 +162,8 @@ sophosxg_deploy() { [ -f "$_import_pkcs12" ] && rm -f "$_import_pkcs12" return 1 fi - - # create post request - _deploy_post_body="$(_mktemp)" - if [ ! -f "$_deploy_post_body" ]; then - _err "Error creating temp file for HTTP POST" - return 1 - fi - - printf '--SOPHOSXGPOST\r\n' >> "$_deploy_post_body" - printf 'Content-Type: application/xml; charset=utf-8\r\n' >> "$_deploy_post_body" - printf 'Content-Disposition: form-data; name="reqxml"\r\n' >> "$_deploy_post_body" - printf '\r\n' >> "$_deploy_post_body" - printf '\r\n' >> "$_deploy_post_body" - printf '%s\r\n%s\r\n' "$Le_Deploy_sophosxg_user" "$Le_Deploy_sophosxg_password" >> "$_deploy_post_body" - printf '' >> "$_deploy_post_body" - - - %s - UploadCertificate - pkcs12 - %s - certificate.p12 - - - ---SOPHOSXGPOST -Content-Type: application/octet-stream -Content-Disposition: form-data; filename="certificate.p12"; name="file" -%s ---SOPHOSXGPOST-- - - # do upload of cert - attempt to "update" and on failure try "add" + + # do upload of cert via HTTP POST - attempt to "update" and on failure try "add" _req_action_success="no" for _req_action in update add; do _info "Uploading certificate: $_req_action"