How to easily check whether the certificate has expired or not.
My bash command
You can use, all dates (creating and expiring):
openssl x509 -enddate -noout -in /etc/pki/tls/certs/localhost.crt
I would like to share one liner command to check if a Linux process is running. Below is the one liner command and you can replace “sendmail” to any process you want to check: –
chkdaemon="sendmail" ; ! pgrep $chkdaemon >/dev/null && echo "$chkdaemon not running" || echo "$chkdaemon is running"
I will be sharing more useful commands. Thank you and have fun.