Skip to content

Commit

Permalink
ignore arithmetic evaluation status
Browse files Browse the repository at this point in the history
The return status is 0 if the arithmetic value of the expression is non-zero, 1 if it is zero, and 2 if an error occurred
  • Loading branch information
532910 committed Aug 21, 2024
1 parent e73a56c commit 63fc5d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ovpn-ca.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function ShowCertExpiration
local cert=$1
strftime -s now %s
strftime -s exp -r '%F %TZ' "${$(openssl x509 -dateopt iso_8601 -enddate -noout -in $cert)##*=}"
(( days = (exp-now)/(24*60*60) ))
(( days = (exp-now)/(24*60*60) )) || true
strftime -s date '%F' $exp
if (( days > 0 )); then
(( days < 180 )) && print -nP "%F{143}"
Expand Down

0 comments on commit 63fc5d5

Please sign in to comment.