49 lines
1001 B
Bash
49 lines
1001 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
echo "Waiting for db..."
|
|
|
|
until wp db check --allow-root
|
|
do
|
|
sleep 5
|
|
done
|
|
|
|
echo "db ready"
|
|
|
|
if ! wp core is-installed --allow-root
|
|
then
|
|
echo "installing wp"
|
|
|
|
wp core install \
|
|
--url="$WP_URL" \
|
|
--title="$WP_TITLE" \
|
|
--admin_user="$WP_ADMIN_USER" \
|
|
--admin_password="$WP_ADMIN_PASSWORD" \
|
|
--admin_email="$WP_ADMIN_EMAIL" \
|
|
--skip-email \
|
|
--allow-root
|
|
fi
|
|
|
|
echo "installing plugins"
|
|
|
|
if ! wp plugin is-installed daggerhart-openid-connect-generic
|
|
then
|
|
wp plugin install daggerhart-openid-connect-generic \
|
|
--activate \
|
|
--allow-root
|
|
fi
|
|
|
|
if ! wp plugin is-active daggerhart-openid-connect-generic
|
|
then
|
|
wp plugin activate daggerhart-openid-connect-generic
|
|
fi
|
|
|
|
echo "plugins installed. configuring plugins"
|
|
|
|
# after installing the plugs we can then use the plugin's CLI
|
|
# to configure the plugin
|
|
wp option update openid_connect_generic_settings 'the settings' # TODO lookup
|
|
# or
|
|
wp option patch update ...
|