Need to add a few features to a shell script.

rmrf

Platinum Member
May 14, 2003
2,872
0
0
This is the script I will be modifying:

http://daemons.net/~matty/code/ssl-cert-check

This is a premade script that my company has been using for a while, but if possible, we'd like to add some functionality to it. Here's what I had in mind:

  • Send an email if a cert is close to expiring(the script already handles that)
  • Send an email if any of the servers have a *non-valid status for a certain number of days in a row, maybe 3-5

Those are the only things I need the script to do. The second one is the functionality that needs to be added. As of now, we are dumping all results into one file. I know how to grep through this file and grab the things I want, but I'm getting hung up on how to make a running tally of whether or not a server has a non-valid status.

I'd appreciate any help on this. We had a thought to convert this to perl, but since I am weak on both, I thought it might be easier to just work with what we have for now. If anyone thinks perl would make our lives easier, and has a solution to what we need, feel free to post it up.

*non-valid status could be anything from expired to a connection problem, etc. anything besides valid.

Thanks.