Forráskód Böngészése

Do not use MAIL_FROM for admin email

Girish Ramakrishnan 6 éve
szülő
commit
264bca37be
1 módosított fájl, 4 hozzáadás és 10 törlés
  1. 4 10
      start.sh

+ 4 - 10
start.sh

@@ -44,15 +44,8 @@ if [[ ! -f "/app/data/.dbsetup" ]]; then
     mkdir -p /app/data/wp-content/mu-plugins
     cp -r /app/code/wp-content-vanilla/* /app/data/wp-content/
 
-    if [[ -n "${LDAP_SERVER:-}" ]]; then
-        admin_password=$(pwgen -1y 16)
-        admin_email=${MAIL_FROM}
-    else
-        admin_password="changeme"
-        admin_email=${MAIL_FROM}
-    fi
-
-    echo "Admin password is ${admin_password} and email is ${admin_email}"
+    admin_password="changeme"
+    admin_email="admin@cloudron.local"
 
     # --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 \
@@ -111,9 +104,10 @@ $WP option update siteurl "${APP_ORIGIN}"
 $WP option update home "${APP_ORIGIN}"
 
 # If the user has not changed the email, update it to reflect it any domain change
+# TODO: remove this after this release
 if [[ "$($WP option get admin_email)" == *.app@* ]]; then
     echo "Updating admin email since it was unchanged"
-    $WP option update admin_email "${MAIL_FROM}"
+    $WP option update admin_email "admin@cloudron.local"
 fi
 
 # configure WP mail smtp plugin (smtp_user, smtp_pass can be set when supported)