diff --git a/Prometheus/install_Alertmanager.sh b/Prometheus/install_Alertmanager.sh index 219a91e..be4f237 100644 --- a/Prometheus/install_Alertmanager.sh +++ b/Prometheus/install_Alertmanager.sh @@ -61,6 +61,12 @@ echo "--------------------------------------------------------" read -p "Do you want to enable Email Notifications? [y/N]: " ENABLE_EMAIL if [[ "$ENABLE_EMAIL" =~ ^[Yy]$ ]]; then read -p "Enter SMTP Host (e.g. smtp.qq.com:465): " SMTP_HOST + # Ensure port is included + if [[ ! "$SMTP_HOST" == *":"* ]]; then + echo "Warning: Port is missing. Using default port :465" + SMTP_HOST="${SMTP_HOST}:465" + fi + read -p "Enter SMTP Auth Username (Email): " SMTP_USER read -s -p "Enter SMTP Auth Password: " SMTP_PASS echo ""