mirror of
https://git.myvelabs.com/docker/myvemailbackup.git
synced 2025-12-17 21:36:17 +00:00
Update 01-setup.sh
This commit is contained in:
parent
3342f61e35
commit
3dd812c70d
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue