Fix testing of whitelist-domains.conf

This commit is contained in:
Mitchell Krog 2019-06-24 17:04:18 +02:00
parent ddc02ffbb5
commit 8245f38950
No known key found for this signature in database
GPG key ID: C243C388553EDE5D

View file

@ -58,11 +58,10 @@ sleep 30s
# ************************************************* # *************************************************
run_curltest1 () { run_curltest1 () {
if curl -I http://localhost:9000 -e http://myowndomain.com 2>&1 | grep -i 'Welcome'; then if curl http://localhost:9000 -e http://www.myowndomain.com 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - User whitelist-domains.conf working" echo "${bold}${green}PASSED - User whitelist-domains.conf working"
else else
echo "${bold}${red}FAILED - User whitelist-domains.conf NOT working" echo "${bold}${red}FAILED - User whitelist-domains.conf NOT working"
curl -I http://localhost:9000 -e http://myowndomain.com 2>&1
#exit 1 #exit 1
fi fi
} }
@ -73,11 +72,10 @@ run_curltest1
# ************************************************* # *************************************************
run_curltest2 () { run_curltest2 () {
if curl -I http://localhost:9000 -e http://www.myotherdomain.com 2>&1 | grep -i 'Welcome'; then if curl http://localhost:9000 -e http://www.myotherdomain.com 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - User whitelist-domains.conf working" echo "${bold}${green}PASSED - User whitelist-domains.conf working"
else else
echo "${bold}${red}FAILED - User whitelist-domains.conf NOT working" echo "${bold}${red}FAILED - User whitelist-domains.conf NOT working"
curl -I http://localhost:9000 -e http://www.myotherdomain.com 2>&1
#exit 1 #exit 1
fi fi
} }