Browse Source

Fix -preferred-chain arg (#712)

Show help if no domain specified (#705)
pull/715/head
Tim Kimber 4 years ago
parent
commit
96201d441f
No known key found for this signature in database GPG Key ID: 3E1804964E76BD18
1 changed files with 11 additions and 4 deletions
  1. +11
    -4
      getssl

+ 11
- 4
getssl View File

@ -271,6 +271,9 @@
# 2021-08-26 Improve upgrade check & make upgrade do a full install when possible (tlhackque) (#694) (2.42)
# 2021-09-02 Fix version compare - cURL v8 may have single digit minor numbers. (tlhackque) (2.43)
# 2021-09-26 Delete key file when key algorithm has changed (makuhama)
# 2021-09-30 better error if curl returns 60 (#709)
# 2021-10-01 Fix -preferred-chain argument (#712)
# 2021-10-01 Show help if no domain specified (#705)(2.44)
# ----------------------------------------------------------------------------------------
case :$SHELLOPTS: in
@ -279,7 +282,7 @@ esac
PROGNAME=${0##*/}
PROGDIR="$(cd "$(dirname "$0")" || exit; pwd -P;)"
VERSION="2.43"
VERSION="2.44"
# defaults
ACCOUNT_KEY_LENGTH=4096
@ -290,7 +293,7 @@ CHALLENGE_CHECK_TYPE="http"
CHECK_REMOTE_WAIT=0
CHECK_REMOTE="true"
if [[ -n "${GITHUB_REPOSITORY}" ]] ; then
CODE_LOCATION="https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/getssl/master/getssl"
CODE_LOCATION="https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/master/getssl"
RELEASE_API="https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/latest"
else
CODE_LOCATION="https://raw.githubusercontent.com/srvrco/getssl/master/getssl"
@ -820,7 +823,7 @@ check_getssl_upgrade() { # check if a more recent release is available
if [ "$TEMP_UPGRADE_FILE" == "" ]; then
error_exit "mktemp failed"
fi
CODE_LOCATION=$(sed -e"s/getssl\/master/${release_tag}/" <<<"$CODE_LOCATION")
CODE_LOCATION=$(sed -e"s/master/${release_tag}/" <<<"$CODE_LOCATION")
# shellcheck disable=SC2086
debug curl ${_NOMETER:---silent} --user-agent "$CURL_USERAGENT" "$CODE_LOCATION" --output "$TEMP_UPGRADE_FILE"
# shellcheck disable=SC2086
@ -2755,7 +2758,7 @@ while [[ -n ${1+defined} ]]; do
_ONLY_CHECK_CONFIG=1 ;;
-w)
shift; WORKING_DIR="$1" ;;
-preferred-chain)
-preferred-chain | --preferred-chain)
shift; PREFERRED_CHAIN="$1" ;;
--source)
return ;;
@ -2830,6 +2833,10 @@ if [[ $_UPGRADE_CHECK -eq 1 ]]; then
# if nothing in command line and no revocation and not only config check,
# then exit after upgrade
if [[ -z "$DOMAIN" ]] && [[ ${_CHECK_ALL} -ne 1 ]] && [[ ${_REVOKE} -ne 1 ]] && [ "${_ONLY_CHECK_CONFIG}" -ne 1 ]; then
# if nothing in command line, print help before exit.
if [[ -z "$DOMAIN" ]] && [[ ${_CHECK_ALL} -ne 1 ]]; then
help_message
fi
graceful_exit
fi
fi


Loading…
Cancel
Save