mirror of
https://git.sindominio.net/estibadores/wordpress.git
synced 2024-11-24 19:41:07 +01:00
16 lines
401 B
Plaintext
16 lines
401 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
export WORDPRESS_ROOT=/app
|
||
|
WP_CLI="/usr/local/bin/wp --allow-root --path=$WORDPRESS_ROOT"
|
||
|
|
||
|
# TODO: wait for the DB to be ready
|
||
|
sleep 10
|
||
|
|
||
|
if ! $WP_CLI core is-installed; then
|
||
|
echo "Install Wordpress"
|
||
|
$WP_CLI core install --url="$WP_URL" --title="$WP_TITLE" --admin_user="$WP_USER" --admin_password="$WP_PASS" --admin_email="$WP_EMAIL"
|
||
|
else
|
||
|
echo "Update DB"
|
||
|
$WP_CLI core update-db
|
||
|
fi
|