Browse Source

Merge pull request #124 from m007/master

Add -Q switch to mute notification about successful upgrades of getssl  (issue #123 )
pull/127/head
serverco 9 years ago
committed by GitHub
parent
commit
32bf42b261
2 changed files with 18 additions and 8 deletions
  1. +6
    -4
      README.md
  2. +12
    -4
      getssl

+ 6
- 4
README.md View File

@ -31,10 +31,10 @@ git clone https://github.com/srvrco/getssl.git
GetSSL was written in standard bash ( so can be run on a server, a desktop computer, or even a virtualbox) and add the checks, and certificates to a remote server ( providing you have a ssh with key, sftp or ftp access to the remote server).
```
getssl ver. 1.00
getssl ver. 1.49
Obtain SSL certificates from the letsencrypt.org ACME server
Usage: getssl [-h|--help] [-d|--debug] [-c|--create] [-f|--force] [-a|--all] [-q|--quiet] [-u|--upgrade] [-w working_dir] domain
Usage: getssl [-h|--help] [-d|--debug] [-c|--create] [-f|--force] [-a|--all] [-q|--quiet] [-Q|--mute] [-u|--upgrade] [-U|--nocheck] [-w working_dir] domain
Options:
-h, --help Display this help message and exit
@ -42,8 +42,10 @@ Options:
-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)
-u, --upgrade Upgrade getssl if more recent version available
-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
```


+ 12
- 4
getssl View File

@ -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)


Loading…
Cancel
Save