warn-if-broken-url/warn-if-broken-url.sh
2021-01-08 19:23:14 +00:00

19 lines
304 B
Bash
Executable File

#!/usr/bin/env bash
set -eu
URL="https://status.caracals.org"
SCRIPT_PATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
pushd ${SCRIPT_PATH} > /dev/null
if ret=$(curl -s -f "${URL}"); then
echo "Marche"
else
echo "Marche pôs"
cat msg.txt | msmtp alban.bronisz@gmail.com
fi
popd