diff options
-rwxr-xr-x | certexpiry.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/certexpiry.sh b/certexpiry.sh index ea2feeb..72ef8f8 100755 --- a/certexpiry.sh +++ b/certexpiry.sh @@ -59,14 +59,14 @@ while read HOSTANDPORT ; do # echo "DEBUG: NOW: $NOW." # Number of seconds left - DIFFERENCE=$(expr "$EXPIRY" - "$NOW") + DIFFERENCE=$(("$EXPIRY" - "$NOW")) # echo "DEBUG: DIFFERENCE: $DIFFERENCE." # Warn if less than WARNSECONDS less if [ "$DIFFERENCE" -lt "$WARNSECONDS" ] ; then - echo "Warning! The certificate at $HOST:$PORT expires in $DIFFERENCE seconds (~$(expr $DIFFERENCE / 60 / 60 / 24) days)." + echo "Warning! The certificate at $HOST:$PORT expires in $DIFFERENCE seconds (~$((DIFFERENCE / 60 / 60 / 24)) days)." # else -# echo "DEBUG: The certificate at $HOST:$PORT expires in $DIFFERENCE seconds (~$(expr $DIFFERENCE / 60 / 60 / 24) days)." +# echo "DEBUG: The certificate at $HOST:$PORT expires in $DIFFERENCE seconds (~$((DIFFERENCE / 60 / 60 / 24)) days)." fi done < "$HOSTSANDPORTS" |