|
|
@ -1,15 +1,17 @@
|
|
|
|
#!/bin/bash
|
|
|
|
#!/bin/bash
|
|
|
|
cd localhost/html
|
|
|
|
cd /var/www/html
|
|
|
|
if [ ! -f "./wp-config.php" ]; then
|
|
|
|
if [ ! -f "./wp-config.php" ]; then
|
|
|
|
# su -s /bin/bash www-data -c
|
|
|
|
# su -s /bin/bash www-data -c
|
|
|
|
COUNTER=0
|
|
|
|
COUNTER=0
|
|
|
|
until [ "$(curl -v mysql:3306 2>&1 | grep native)" ];
|
|
|
|
until [ "$(curl -v mysql:3306 2>&1 | grep native)" ];
|
|
|
|
do
|
|
|
|
do
|
|
|
|
|
|
|
|
echo "Counter: ${COUNTER}"
|
|
|
|
COUNTER=$((COUNTER+1))
|
|
|
|
COUNTER=$((COUNTER+1))
|
|
|
|
if [ ${COUNTER} = 10 ]; then
|
|
|
|
if [ ${COUNTER} = 10 ]; then
|
|
|
|
echo '--- MySQL is starting, please wait... ---'
|
|
|
|
echo '--- MySQL is starting, please wait... ---'
|
|
|
|
elif [ ${COUNTER} = 100 ]; then
|
|
|
|
elif [ ${COUNTER} = 100 ]; then
|
|
|
|
echo '--- MySQL is timeout, exit! ---'
|
|
|
|
echo '--- MySQL is timeout, exit! ---'
|
|
|
|
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
sleep 1
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
done
|
|
|
@ -33,7 +35,7 @@ if [ ! -f "./wp-config.php" ]; then
|
|
|
|
--skip-email \
|
|
|
|
--skip-email \
|
|
|
|
--allow-root
|
|
|
|
--allow-root
|
|
|
|
wp plugin install litespeed-cache \
|
|
|
|
wp plugin install litespeed-cache \
|
|
|
|
--activate
|
|
|
|
--activate \
|
|
|
|
--allow-root
|
|
|
|
--allow-root
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|