|
|
@ -2,9 +2,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
IP="$(docker inspect webmail_webmail_1|jq -r '.[0].NetworkSettings.Networks.webmail_default.IPAddress')"
|
|
|
|
IP="$(docker inspect webmail_webmail_1|jq -r '.[0].NetworkSettings.Networks.webmail_default.IPAddress')"
|
|
|
|
|
|
|
|
|
|
|
|
echo "webmail is on $IP" >/dev/stderr
|
|
|
|
MAIN_RETURN_CODE=$(curl -I -so /dev/null -w "%{http_code}" http://$IP/)
|
|
|
|
wget -S -O - "http://$IP/" &>/dev/stderr
|
|
|
|
[[ $MAIN_RETURN_CODE -ne 200 ]] && [[ $MAIN_RETURN_CODE -ne 302 ]] && echo "The default page of snappymail hasn't returned 200!" >>/dev/stderr && exit 1
|
|
|
|
docker inspect webmail_webmail_1 &>/dev/stderr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[ $(curl -I -so /dev/null -w "%{http_code}" http://$IP/) -ne 200 ]] && echo "The default page of snappymail hasn't returned 200!" >>/dev/stderr && exit 1
|
|
|
|
|
|
|
|
[[ $(curl -I -so /dev/null -w "%{http_code}" http://$IP/?admin) -ne 403 ]] && echo "The admin of snappymail is not disabled!" >>/dev/stderr && exit 1
|
|
|
|
[[ $(curl -I -so /dev/null -w "%{http_code}" http://$IP/?admin) -ne 403 ]] && echo "The admin of snappymail is not disabled!" >>/dev/stderr && exit 1
|
|
|
|