From 875023aa990f01de4d9d0e26819573c33f097bda Mon Sep 17 00:00:00 2001 From: Massimiliano Adamo <massimiliano.adamo@geant.org> Date: Thu, 3 Jun 2021 22:49:42 +0200 Subject: [PATCH] minor fixes to scrtip --- acme-downloader.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/acme-downloader.sh b/acme-downloader.sh index 823df95..5fe7546 100755 --- a/acme-downloader.sh +++ b/acme-downloader.sh @@ -44,6 +44,7 @@ check_version() { METADATA_URL="https://artifactory.software.geant.org/artifactory/api/storage/acme-downloader/acme-downloader.sh" REMOTE_MD5=$(curl -s $METADATA_URL | jq -j .checksums.md5) if [[ $LOCAL_MD5 != $REMOTE_MD5 ]]; then + echo "" echo "$1 differs from $SCRIPT_URL" echo "suggesting that you are running an older version" echo "in order to fetch and install the new version you can use the option: --update" @@ -92,18 +93,19 @@ usage() { echo " --key-destination [OPTIONAL Default: ${KEY_BASE}/<cert-name>.key]" echo " --ca-destination [OPTIONAL Default: ${CERT_BASE}/COMODO_<type>.crt]" echo " --wildcard [OPTIONAL if the certificate is wildcard]" + echo " --check-version [OPTIONAL check difference with upstream exit]" echo " --update [OPTIONAL self-updates the script and exit]" echo "" + clean_up 2 } -OPTS=$(getopt -o "h" --longoptions "help,redis-token:,vault-token:,cert-name:,team-name:,days:,type:,cert-destination:,fullchain-destination:,key-destination:,ca-destination:,wildcard" -- "$@") +OPTS=$(getopt -o "h" --longoptions "help,redis-token:,vault-token:,cert-name:,team-name:,days:,type:,cert-destination:,fullchain-destination:,key-destination:,ca-destination:,check-version,update,wildcard" -- "$@") eval set -- "$OPTS" while true; do case "$1" in -h | --help) usage - clean_up 2 ;; --redis-token) shift -- GitLab