From 30e74b6233fef46e558b385437725122bfc60685 Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 24 Jun 2022 15:20:47 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20modified:=20files/run.s?= =?UTF-8?q?h=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/run.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/files/run.sh b/files/run.sh index daa09ac..c54b418 100644 --- a/files/run.sh +++ b/files/run.sh @@ -35,7 +35,15 @@ else chown -R nginx:nginx /usr/html 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 + echo "[i] Initializing mysql database" rm -Rf "/var/lib/mysql/" /usr/bin/mysql_install_db --user=mysql --datadir=/var/lib/mysql __mysqld @@ -54,6 +62,7 @@ chown -Rf mysql:mysql /var/lib/mysql /run/mysqld __mysql_test || __mysqld 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 "GRANT ALL PRIVILEGES ON $DB_NAME.* TO $DB_NAME@localhost IDENTIFIED BY '$DB_PASS'" fi