Initial Nextcloud Docker setup for nxt.bhatfamily.in
This commit is contained in:
27
scripts/test.sh
Executable file
27
scripts/test.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
# scripts/test.sh
|
||||
set -euo pipefail
|
||||
|
||||
DOMAIN="nxt.bhatfamily.in"
|
||||
HTTP_PORT=8082
|
||||
HTTPS_PORT=8446
|
||||
|
||||
echo "==> Testing HTTP redirect..."
|
||||
curl -I "http://${DOMAIN}:${HTTP_PORT}" || {
|
||||
echo "HTTP test failed."
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "==> Testing HTTPS endpoint (ignoring self-signed cert errors)..."
|
||||
curl -k -I "https://${DOMAIN}:${HTTPS_PORT}" || {
|
||||
echo "HTTPS test failed."
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "==> Quick application-level check (Nextcloud status.php)..."
|
||||
curl -k "https://${DOMAIN}:${HTTPS_PORT}/status.php" || {
|
||||
echo "status.php test failed."
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "All tests passed."
|
||||
Reference in New Issue
Block a user