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
No related tags found
No related merge requests found
Pipeline #29614 passed
...@@ -44,6 +44,7 @@ check_version() { ...@@ -44,6 +44,7 @@ check_version() {
METADATA_URL="https://artifactory.software.geant.org/artifactory/api/storage/acme-downloader/acme-downloader.sh" 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) REMOTE_MD5=$(curl -s $METADATA_URL | jq -j .checksums.md5)
if [[ $LOCAL_MD5 != $REMOTE_MD5 ]]; then if [[ $LOCAL_MD5 != $REMOTE_MD5 ]]; then
echo ""
echo "$1 differs from $SCRIPT_URL" echo "$1 differs from $SCRIPT_URL"
echo "suggesting that you are running an older version" 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" echo "in order to fetch and install the new version you can use the option: --update"
...@@ -92,18 +93,19 @@ usage() { ...@@ -92,18 +93,19 @@ usage() {
echo " --key-destination [OPTIONAL Default: ${KEY_BASE}/<cert-name>.key]" echo " --key-destination [OPTIONAL Default: ${KEY_BASE}/<cert-name>.key]"
echo " --ca-destination [OPTIONAL Default: ${CERT_BASE}/COMODO_<type>.crt]" echo " --ca-destination [OPTIONAL Default: ${CERT_BASE}/COMODO_<type>.crt]"
echo " --wildcard [OPTIONAL if the certificate is wildcard]" 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 " --update [OPTIONAL self-updates the script and exit]"
echo "" 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" eval set -- "$OPTS"
while true; do while true; do
case "$1" in case "$1" in
-h | --help) -h | --help)
usage usage
clean_up 2
;; ;;
--redis-token) --redis-token)
shift shift
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment