Command line health check with an audio output
script file
#!/bin/bash
response=$(
curl https://selleo.com \
--write-out 200 \
--silent \
--output /dev/null
)
if test "$response" -ge 200 && test "$response" -le 299 ; then
say "yay, it works"
else
say "oops"
fi
run the script with watch
watch -n 5 "./script"
TweetLinux users can use
spd-say