|
@@ -28,7 +28,7 @@ if [[ ! -f "/app/data/.dbsetup" ]]; then
|
|
mkdir -p /app/data/wp-content/mu-plugins
|
|
mkdir -p /app/data/wp-content/mu-plugins
|
|
cp -r /app/code/wp-content-vanilla/* /app/data/wp-content/
|
|
cp -r /app/code/wp-content-vanilla/* /app/data/wp-content/
|
|
|
|
|
|
- # --skip-email is part of 0.23.0 (https://github.com/wp-cli/wp-cli/pull/2345)
|
|
|
|
|
|
+ # --skip-email is part of 0.23.0 https://github.com/wp-cli/wp-cli/pull/2345 and https://github.com/wp-cli/wp-cli/issues/1164
|
|
$WP --url="${APP_ORIGIN}" --skip-email core install \
|
|
$WP --url="${APP_ORIGIN}" --skip-email core install \
|
|
--url="${APP_ORIGIN}" \
|
|
--url="${APP_ORIGIN}" \
|
|
--title="My blog" \
|
|
--title="My blog" \
|
|
@@ -70,8 +70,10 @@ $WP option update smtp_auth false
|
|
|
|
|
|
# reset the admin password. do this after configuring smtp mail
|
|
# reset the admin password. do this after configuring smtp mail
|
|
echo "Resetting admin password"
|
|
echo "Resetting admin password"
|
|
-$WP user update $($WP user get admin --field=ID) --user_pass="${admin_password}"
|
|
|
|
-$WP user update $($WP user get admin --field=ID) --user_email="${admin_email}"
|
|
|
|
|
|
+# see http://wp-cli.org/docs/internal-api/wp-cli-add-hook/ and https://codex.wordpress.org/Plugin_API/Filter_Reference/send_password_change_email
|
|
|
|
+echo "<?php WP_CLI::add_hook('after_wp_load', function () { add_filter( 'send_password_change_email', '__return_false' ); }); ?>" > /run/wordpress/skip-email.php
|
|
|
|
+$WP --require=/run/wordpress/skip-email.php user update $($WP user get admin --field=ID) --user_pass="${admin_password}"
|
|
|
|
+$WP --require=/run/wordpress/skip-email.php user update $($WP user get admin --field=ID) --user_email="${admin_email}"
|
|
|
|
|
|
# configure LDAP
|
|
# configure LDAP
|
|
# https://github.com/heiglandreas/authLdap/blob/master/authLdap.php#L644
|
|
# https://github.com/heiglandreas/authLdap/blob/master/authLdap.php#L644
|