@ -112,10 +112,11 @@
# 2016-09-24 merged in IPv6 support (1.46)
# 2016-09-27 added additional debug info issue #119 (1.47)
# 2016-09-27 removed IPv6 switch in favour of checking both IPv4 and IPv6 (1.48)
# 2016-09-28 Add -Q, or --mute, switch to mute notifications about successfully upgrading getssl (1.49)
# ---------------------------------------------------------------------------
PROGNAME=${0##*/}
VERSION="1.48 "
VERSION="1.49 "
# defaults
CODE_LOCATION="https://raw.githubusercontent.com/srvrco/getssl/master/getssl"
@ -142,6 +143,7 @@ _CREATE_CONFIG=0
_CHECK_ALL=0
_FORCE_RENEW=0
_QUIET=0
_MUTE=0
_UPGRADE=0
_UPGRADE_CHECK=1
@ -232,7 +234,9 @@ check_getssl_upgrade() { # check if a more recent version of code is available a
install "$0" "${0}.v${VERSION}"
install "$temp_upgrade" "$0"
rm -f "$temp_upgrade"
echo "Updated getssl from v${VERSION} to v${latestversion}"
if [ ${_MUTE} -eq 0 ]; then
echo "Updated getssl from v${VERSION} to v${latestversion}"
fi
eval "$ORIGCMD"
graceful_exit
else
@ -388,7 +392,8 @@ help_message() { # print out the help message
-c, --create Create default config files
-f, --force Force renewal of cert (overrides expiry checks)
-a, --all Check all certificates
-q, --quiet Quiet mode (only outputs on error, or succcess of new cert)
-q, --quiet Quiet mode (only outputs on error, succcess of new cert, or getssl was upgraded)
-Q, --mute Like -q, but mutes notification about successfull upgrade
-u, --upgrade Upgrade getssl if a more recent version is available
-U, --nocheck Do not check if a more recent version is available
-w working_dir Working directory
@ -553,7 +558,7 @@ urlbase64() { # urlbase64: base64 encoded string with '+' replaced with '-' and
}
usage() { # program usage
echo "Usage: $PROGNAME [-h|--help] [-d|--debug] [-c|--create] [-f|--force] [-a|--all] [-q|--quiet] [-u|--upgrade] [-U|--nocheck] [-w working_dir] domain"
echo "Usage: $PROGNAME [-h|--help] [-d|--debug] [-c|--create] [-f|--force] [-a|--all] [-q|--quiet] [-Q|--mute] [- u|--upgrade] [-U|--nocheck] [-w working_dir] domain"
}
write_domain_template() { # write out a template file for a domain.
@ -695,6 +700,9 @@ while [[ -n $1 ]]; do
_CHECK_ALL=1 ;;
-q | --quiet)
_QUIET=1 ;;
-Q | --mute)
_QUIET=1
_MUTE=1 ;;
-u | --upgrade)
_UPGRADE=1 ;;
-U | --nocheck)