Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Added new var 'CAPTCHA_ENABLED_
Browse files Browse the repository at this point in the history
Added tip for answering the enable captcha question

Removed debugging git checkout

Fixed code indentation
  • Loading branch information
pskindel authored and Marcin Makowski committed Jan 21, 2016
1 parent f1b1e8e commit 237975e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion configure.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ do
setup_field "RULE_ENGINE_SERVICE_USERNAME" "[email protected]"
setup_field "RULE_ENGINE_SERVICE_PASSWORD" $(random_password)

write_section "GOOGLE CAPTCHA CREDENTIALS"
write_section "GOOGLE CAPTCHA CONFIGURATION"
setup_field "CAPTCHA_ENABLED" "false" "enable Google reCAPTCHA? (true-yes, false-no)"
setup_field "CAPTCHA_CREDENTIALS_SITE_KEY" "" "google Captcha site key"
setup_field "CAPTCHA_CREDENTIALS_SECRET_KEY" "" "google Captcha secret key"

Expand Down
24 changes: 12 additions & 12 deletions installer.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -199,18 +199,18 @@ function provide_dashboard_security_credentials {
}

function provide_captcha_credentials {
CAPTCHA_CREDENTIALS="{\"siteKey\":\"${CAPTCHA_CREDENTIALS_SITE_KEY}\",\"secretKey\":\"${CAPTCHA_CREDENTIALS_SECRET_KEY}\"}"
EXISTS=$(check_service_exists recaptcha-ups)
if [ $EXISTS -eq 0 ]
then
echo "Creating recaptcha-ups $CAPTCHA_CREDENTIALS"
RETURN=($(cf cups recaptcha-ups -p ${CAPTCHA_CREDENTIALS}))
else
echo "Updating recaptcha-ups $CAPTCHA_CREDENTIALS"
RETURN=($(cf uups recaptcha-ups -p ${CAPTCHA_CREDENTIALS}))
fi
check_return
CAPTCHA_CREDENTIALS="{\"siteKey\":\"${CAPTCHA_CREDENTIALS_SITE_KEY}\",\"secretKey\":\"${CAPTCHA_CREDENTIALS_SECRET_KEY}\",\"enabled\":\"${CAPTCHA_ENABLED}\"}"
EXISTS=$(check_service_exists recaptcha-ups)
if [ $EXISTS -eq 0 ]
then
echo "Creating recaptcha-ups $CAPTCHA_CREDENTIALS"
RETURN=($(cf cups recaptcha-ups -p ${CAPTCHA_CREDENTIALS}))
else
echo "Updating recaptcha-ups $CAPTCHA_CREDENTIALS"
RETURN=($(cf uups recaptcha-ups -p ${CAPTCHA_CREDENTIALS}))
fi

check_return
}

function deploy_backend {
Expand Down

0 comments on commit 237975e

Please sign in to comment.