mirror of
https://github.com/casjaysdevdocker/wordpress
synced 2025-01-30 18:34:30 -05:00
🗃️ modified: files/run.sh 🗃️
This commit is contained in:
parent
b5edf8da6d
commit
30e74b6233
@ -35,7 +35,15 @@ else
|
|||||||
chown -R nginx:nginx /usr/html
|
chown -R nginx:nginx /usr/html
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -d "/var/lib/wordpress/devel" ]; then
|
||||||
|
echo "[i] Initializing plugin development dir"
|
||||||
|
for d in /var/lib/wordpress/devel/*; do
|
||||||
|
ln -sf "/var/lib/wordpress/devel/$d" "/usr/html/wp-content/plugins/$d"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d "/var/lib/mysql/mysql" ]; then
|
if [ ! -d "/var/lib/mysql/mysql" ]; then
|
||||||
|
echo "[i] Initializing mysql database"
|
||||||
rm -Rf "/var/lib/mysql/"
|
rm -Rf "/var/lib/mysql/"
|
||||||
/usr/bin/mysql_install_db --user=mysql --datadir=/var/lib/mysql
|
/usr/bin/mysql_install_db --user=mysql --datadir=/var/lib/mysql
|
||||||
__mysqld
|
__mysqld
|
||||||
@ -54,6 +62,7 @@ chown -Rf mysql:mysql /var/lib/mysql /run/mysqld
|
|||||||
__mysql_test || __mysqld
|
__mysql_test || __mysqld
|
||||||
|
|
||||||
if [ ! -d "/var/lib/mysql/wordpress" ]; then
|
if [ ! -d "/var/lib/mysql/wordpress" ]; then
|
||||||
|
echo "[i] Creating word database"
|
||||||
mysql -uroot -p$DB_PASS -e "CREATE DATABASE $DB_NAME"
|
mysql -uroot -p$DB_PASS -e "CREATE DATABASE $DB_NAME"
|
||||||
mysql -uroot -p$DB_PASS -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO $DB_NAME@localhost IDENTIFIED BY '$DB_PASS'"
|
mysql -uroot -p$DB_PASS -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO $DB_NAME@localhost IDENTIFIED BY '$DB_PASS'"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user