add command to calculate days until cert expiration

This commit is contained in:
xfnw 2022-03-27 11:10:25 -04:00
parent 8447963ff1
commit 48feef1d87
1 changed files with 5 additions and 0 deletions

5
bin/expdays Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
dat=$(openssl x509 -noout -enddate | cut -d= -f2)
echo $(( ($(date -d "$dat" '+%s') - $(date '+%s')) / 86400 ))