Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOG-1638: Fix check for existence of subdomain #122

Merged
merged 1 commit into from Nov 20, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -354,11 +354,11 @@ checkIfLogglyServersAccessible() {

echo "INFO: Checking if '$LOGGLY_ACCOUNT' subdomain is valid."
if [[ $LOGGLY_ACCOUNT != $INVALID_SUBDOMAIN ]]; then
if [[ $(curl -L -s --head --request GET $LOGGLY_ACCOUNT_URL/login -w '%{http_code}' -o /dev/null) == "200" ]]; then
echo "INFO: $LOGGLY_ACCOUNT_URL is valid and reachable."
if curl --head -s --request GET $LOGGLY_ACCOUNT_URL/login | grep -q "accounts/invalid" ; then
logMsgToConfigSysLog "ERROR" "ERROR: This is not a recognized subdomain. Please ask the account owner for the subdomain they signed up with."
exit 1
else
logMsgToConfigSysLog "ERROR" "ERROR: This is not a recognized subdomain. Please ask the account owner for the subdomain they signed up with."
exit 1
echo "INFO: $LOGGLY_ACCOUNT_URL is valid and reachable."
fi
else
logMsgToConfigSysLog "ERROR" "ERROR: This is not a recognized subdomain. Please ask the account owner for the subdomain they signed up with. Please note that your subdomain is just the first string in your loggly account URL not the entire account name."
@@ -234,11 +234,11 @@ checkIfLogglyServersAccessible() {

echo "INFO: Checking if '$LOGGLY_ACCOUNT' subdomain is valid."
if [[ $LOGGLY_ACCOUNT != $INVALID_SUBDOMAIN ]]; then
if [ $(curl -s --head --request GET $LOGGLY_ACCOUNT_URL/login | grep "200 OK\|HTTP/2 200" | wc -l) == 1 ]; then
echo "INFO: $LOGGLY_ACCOUNT_URL is valid and reachable."
else
if curl --head -s --request GET $LOGGLY_ACCOUNT_URL/login | grep -q "accounts/invalid" ; then
logMsgToConfigSysLog "ERROR" "ERROR: This is not a recognized subdomain. Please ask the account owner for the subdomain they signed up with."
exit 1
else
echo "INFO: $LOGGLY_ACCOUNT_URL is valid and reachable."
fi
else
logMsgToConfigSysLog "ERROR" "ERROR: This is not a recognized subdomain. Please ask the account owner for the subdomain they signed up with. Please note that your subdomain is just the first string in your loggly account URL not the entire account name."
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.