Update 01-setup.sh

This commit is contained in:
myve 2024-12-19 21:01:14 +00:00
commit 3dd812c70d

View file

@ -96,11 +96,11 @@ sudo install /dev/stdin /usr/local/bin/downtime-check >/dev/null <<MAILSERVER
#!/usr/bin/env bash
if ping -q -c 1 -W 15 1.1.1.1 >/dev/null && ping -q -c 1 -W 15 google.com >/dev/null
then
if [[ \$(ssh ${domain} docker container inspect -f '{{.State.Running}}' myvemail) == true ]]
if [[ \$(ssh mail.${_subdomain} docker container inspect -f '{{.State.Running}}' myvemail) == true ]]
then
exit 0
else
echo "${domain} was inaccessible on \$(date)" >>$(pwd)/data/log/downtime
echo "mail.${_subdomain} was inaccessible on \$(date)" >>$(pwd)/data/log/downtime
exit 1
fi
else