Files
nextcloud-docker/scripts/test.sh

28 lines
593 B
Bash
Executable File

#!/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."