Fix regression where not using OpenID would cause the recipe to fail to deploy
This commit is contained in:
parent
bc05150011
commit
d31244bdd6
@ -19,6 +19,9 @@
|
||||
* `abra app new civicrm-wordpress`
|
||||
* `abra app config <app-name>`
|
||||
|
||||
SMTP:
|
||||
* Make sure to configure Traefik to support SMTP
|
||||
|
||||
Authentik integration:
|
||||
* When configuring, uncomment `COMPOSE_FILE`, `OPEN_ID_CLIENT_ID`, `SECRET_OPEN_ID_CLIENT_SECRET_VERSION`, and `AUTHENTIK_DOMAIN`
|
||||
* To configure your Authentik deployment, follow the guide at [`docs.goauthentik.io/integrations/services/wordpress`](https://docs.goauthentik.io/integrations/services/wordpress/).
|
||||
|
@ -89,33 +89,44 @@ pushd /var/www/html/wp-content/uploads/civicrm/
|
||||
fi
|
||||
popd
|
||||
|
||||
if [[ -n "${OPEN_ID_CLIENT_ID}" ]]; then
|
||||
OPEN_ID_CLIENT_ID="${OPEN_ID_CLIENT_ID:-unused}"
|
||||
if [ "$OPEN_ID_CLIENT_ID" != "unused" ]; then
|
||||
# install OpenID Connect Generic plugin
|
||||
if ! su civicrm -c "wp plugin is-installed daggerhart-openid-connect-generic"; then
|
||||
echo "============ Running OpenId Connect Install ============"
|
||||
su civicrm -c "wp plugin install daggerhart-openid-connect-generic --activate"
|
||||
else
|
||||
echo "OpenID Connect Generic Plugin already installed"
|
||||
fi
|
||||
|
||||
# if openid connect hasn't been configured, insert default settings
|
||||
if ! su civicrm -c "wp option get openid_connect_generic_settings"; then
|
||||
echo "Configuring OpenId Connect Plugin default settings"
|
||||
su civicrm -c "wp option add openid_connect_generic_settings --format=json < /usr/local/etc/civicrm/openid_settings.json"
|
||||
else
|
||||
echo "OpenId Connect Plugin default settings already present"
|
||||
fi
|
||||
|
||||
echo "============ Configuring OpenId Connect ============"
|
||||
su civicrm -c "wp option patch update openid_connect_generic_settings client_id $OPEN_ID_CLIENT_ID"
|
||||
su civicrm -c "wp option patch update openid_connect_generic_settings client_secret $OPEN_ID_CLIENT_SECRET"
|
||||
|
||||
if [[ -n "${AUTHENTIK_DOMAIN}" ]]; then
|
||||
AUTHENTIK_DOMAIN="${AUTHENTIK_DOMAIN:-unused}"
|
||||
if [ "$AUTHENTIK_DOMAIN" != "unused" ]; then
|
||||
echo "============ Configuring Authentik ============"
|
||||
su civicrm -c "wp option patch update openid_connect_generic_settings endpoint_login https://$AUTHENTIK_DOMAIN/application/o/authorize/"
|
||||
su civicrm -c "wp option patch update openid_connect_generic_settings endpoint_userinfo https://$AUTHENTIK_DOMAIN/application/o/userinfo/"
|
||||
su civicrm -c "wp option patch update openid_connect_generic_settings endpoint_token https://$AUTHENTIK_DOMAIN/application/o/token/"
|
||||
su civicrm -c "wp option patch update openid_connect_generic_settings endpoint_end_session https://$AUTHENTIK_DOMAIN/application/o/wordpress/end-session/"
|
||||
else
|
||||
echo "============ Configuring Generic OpenId Provider ============"
|
||||
su civicrm -c "wp option patch update openid_connect_generic_settings endpoint_login $OPEN_ID_PROVIDER_LOGIN_URL"
|
||||
su civicrm -c "wp option patch update openid_connect_generic_settings endpoint_userinfo $OPEN_ID_USERINFO_URL"
|
||||
su civicrm -c "wp option patch update openid_connect_generic_settings endpoint_token $OPEN_ID_TOKEN_ENDPOINT_URL"
|
||||
su civicrm -c "wp option patch update openid_connect_generic_settings endpoint_end_session $OPEN_ID_END_SESSION_URL"
|
||||
fi
|
||||
else
|
||||
echo "not using OpenIdConnect"
|
||||
fi
|
||||
|
||||
echo "============ Setting up cron ============"
|
||||
|
Loading…
x
Reference in New Issue
Block a user