Skip to content
Snippets Groups Projects
Unverified Commit 875023aa authored by Massimiliano Adamo's avatar Massimiliano Adamo
Browse files

minor fixes to scrtip

parent 0076c776
No related branches found
Tags v1.2.6
Loading
Pipeline #29614 passed
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment