The SSL Checker script is a Bash script designed to check the SSL certificate expiration status for a list of domains and send notifications to Slack channels based on the remaining days until expiration. It utilizes WHOIS information and OpenSSL to retrieve SSL certificate details.
- Checks SSL certificate expiration for multiple domains.
- Sends notifications to Slack channels with color-coded information and icons.
- Supports different Slack channels for each domain.
Before using the script, ensure the following prerequisites are met:
- Bash shell environment.
dig
,whois
,openssl
, andcurl
commands installed.- Incoming Webhooks integration enabled in your Slack workspace.
- Visit Incoming Webhooks.
- Click on "Add to Slack" to add the Incoming Webhooks integration to your workspace.
- Choose the channel where you want to receive notifications and click on "Add Incoming WebHooks integration."
- Copy the generated Webhook URL.
- Clone the repository:
git clone https://github.com/alexmeanpug/ssl-checker-slack cd ssl-checker-slack
- Open the script file (
ssl-domains.sh
) and update theSLACK_WEBHOOK_URL
variable with your Slack Incoming Webhook URL. - Make the script executable:
chmod +x ssl-domains.sh
- Edit the
DOMAINS
array in the script, adding domains and their corresponding Slack channels. - Run the script:
./ssl-domains.sh
- SLACK_WEBHOOK_URL: Your Slack Incoming Webhook URL for sending notifications.
- DOMAINS: An array containing domains and their associated Slack channels.
The script will display information about each domain, including the domain name, expiry date, remaining days until expiration, color-coded status, and the Slack channel it's notifying.
- Ensure proper permissions are set for the script (
chmod +x
). - Use the copied Webhook URL to update the
SLACK_WEBHOOK_URL
variable in the script. - Update the
DOMAINS
array with the desired domains and Slack channels.
This project is licensed under the MIT License - see the LICENSE file for details.