You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
2 years ago | |
---|---|---|
test | 2 years ago | |
.gitignore | 2 years ago | |
README.md | 2 years ago | |
check_sites | 2 years ago | |
functions | 2 years ago |
README.md
Site Availability
This program will check a specified list of websites to see if they are available, including if they have a current TLS certificate.
Installation and Setup
- Clone this repo into a directory of your choosing.
- Make the
check_sites
file executable:chmod 755 check_sites
- Create a file named
config
with at least one website address in it. Here is an example with two sites:
#!/bin/bash
sites = (
"https://example1.com"
"https://example2.com"
)
Usage
The program is designed to be run manually or via cron. To run manually, cd
into the installed directory and run ./check_sites
. The results (success or failure) will be shown. Or set up a cronjob like so:
30 * * * * cd /path/to/installed/directory && ./check_sites > /dev/null
Created like that, cron will only send system emails if there has been an error.
Testing
This uses the bats-core testing framework and appears to catch at least the most obvious problems with site availability, but you may want to verify this on your own. See the bats-core
documentation for information on installation and running the tests.