From b103f1b24f03527bab4db71a84cd84d6bc4bdc13 Mon Sep 17 00:00:00 2001 From: srvrco Date: Wed, 22 Feb 2017 12:33:47 +0000 Subject: [PATCH] make no output when -u is only arg and no upgrade available (2017-02-22) --- checkssl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/checkssl b/checkssl index 20fecb3..9ae7581 100755 --- a/checkssl +++ b/checkssl @@ -45,10 +45,11 @@ # 2017-01-12 updated to ignore -r flag if -c is used. (1.15) # 2017-01-31 updated variable for auto upgrade location (1.16) # 2017-02-06 merge branches parsing CN and wildcard certs (1.17) +# 2017-02-22 make no output when -u is only arg and no upgrade available (1.18) # --------------------------------------------------------------------------- PROGNAME=${0##*/} -VERSION="1.17" +VERSION="1.18" ORIGCMD="$0 $*" CODE_LOCATION="https://raw.githubusercontent.com/srvrco/checkssl/master/checkssl" @@ -263,6 +264,9 @@ _requires column # Check if upgrades are available (unless they have specified -U to ignore Upgrade checks) if [[ $_UPGRADE_CHECK -eq 1 ]]; then check_upgrade + if [[ ! $FILEARG && ! $SERVERARG && ! $LOCATIONARG && ! $DOMAINARG ]]; then + graceful_exit + fi fi if [[ ! $FILEARG && ! $SERVERARG && ! $LOCATIONARG && ! $DOMAINARG ]]; then