few update

This commit is contained in:
Cold-Egg
2019-12-20 12:27:57 -05:00
parent ec697780b5
commit 3708fd9e55
9 changed files with 431 additions and 1007 deletions
+29 -12
View File
@@ -2,22 +2,39 @@
cd localhost/html
if [ ! -f "./wp-config.php" ]; then
# su -s /bin/bash www-data -c
wp --allow-root core download --force
counter=0
until [ "$(curl -v --silent mysql:3306 2>&1 | grep native)" ];
COUNTER=0
until [ "$(curl -v mysql:3306 2>&1 | grep native)" ];
do
counter=$((counter+1))
if [ $counter = 10 ]; then
echo --- MySQL is starting, please wait... ---
counter=0
COUNTER=$((COUNTER+1))
if [ ${COUNTER} = 10 ]; then
echo '--- MySQL is starting, please wait... ---'
elif [ ${COUNTER} = 100 ]; then
echo '--- MySQL is timeout, exit! ---'
fi
sleep 1
done
wp --allow-root core config --dbname="$MYSQL_DATABASE" --dbuser="$MYSQL_USER" --dbpass="$MYSQL_PASSWORD" --dbhost=mysql --dbprefix="WP_DB_PREFIX" --force
wp --allow-root core install --title="$WP_TITLE" --url="$DOMAIN" --admin_user="$ADMIN_USERNAME" --admin_email="$ADMIN_EMAIL" --admin_password="$ADMIN_PASSWORD" --skip-email
wp --allow-root plugin install litespeed-cache
wp --allow-root plugin activate litespeed-cache
wp core download \
--allow-root \
--force
wp core config \
--dbname="${MYSQL_DATABASE}" \
--dbuser="${MYSQL_USER}" \
--dbpass="${MYSQL_PASSWORD}" \
--dbhost=mysql \
--dbprefix="${WP_DB_PREFIX}" \
--allow-root \
--force
wp core install \
--title="${WP_TITLE}" \
--url="${DOMAIN}" \
--admin_user="${ADMIN_USERNAME}" \
--admin_email="${ADMIN_EMAIL}" \
--admin_password="${ADMIN_PASSWORD}" \
--skip-email \
--allow-root
wp plugin install litespeed-cache \
--activate
--allow-root
fi