@@ -21,7 +21,7 @@ With the script `alert.sh`, you can be alerted by email, SMS or Pushover in case
2121## Installation 📦
2222
2323By default, it's a good practice to create a ` status ` directory within your home directory and place everything in it :
24- ```
24+ ``` shell
2525mkdir ~ /status
2626cd ~ /status
2727```
@@ -95,7 +95,7 @@ crontab -e
9595
9696Add:
9797
98- ```
98+ ``` text
9999*/1 * * * * bash "/path/to/status.sh" silent >> /dev/null
100100```
101101
@@ -135,7 +135,7 @@ You can display a custom text instead of the HOSTNAME/IP/URL (see example below)
135135
136136status_hostname_list.txt:
137137
138- ``` csv
138+ ``` text
139139ping;8.8.8.8|Google DNS
140140nc;8.8.8.8|DNS @ Google;53
141141curl;http://www.heise.de/ping|www.heise.de
@@ -173,30 +173,33 @@ Example JSON:
173173If you want to signal directly if everything is fine or if something is wrong in the infrastructure, you can insert the SVG icon into your website.
174174
175175Please remember to include the image with a cache breaker URL (eg. an appended timestamp:
176- ```
176+ ``` html
177177<a href =" status.html" >Status <img src =" status.svg?{{ timestamp }}" ></a >
178178```
179179
180180Static websites need to fallback to render the icon with javascript, eg with:
181- ```
181+ ``` html
182182document.write('<img src =" status.svg?' + Date.now() + '" >')
183183```
184184
185185## Custom Script Checks 🛠️
186186
187187You can extend the checks of ` status.sh ` with your own custom shell scripts.
188188
189- If the shell script outputs a return code 0 it is evaluated as available. With other return codes, it is a failure (outage, down).
189+ If the shell script outputs a return code ` 0 ` it is evaluated as available.
190+ With the special return code ` 80 ` , it is not classified as down but as degraded.
191+ With all other return codes, it is a failure (outage, down).
190192
191193Add your script to the ` status_hostname_list.txt ` configuration file. Example:
192194
193- ```
195+ ``` text
194196script;script.sh
195197script;/path/to/your/script.sh|Custom Text
196198script;/path/to/your/script.sh parameterA parameterB|Custom Text
197-
198199```
199200
201+ The script [ ` check-websites.sh ` ] ( ./scripts/check-websites.sh ) is an example.
202+
200203## TODO ✅
201204
2022051 . ** Bug Fixes and Enhancements** : Address any reported issues and consider adding new features to improve the script's functionality.
0 commit comments