From e5e25589248ac73e5bd08ffb9cfe96760c71cc0f Mon Sep 17 00:00:00 2001 From: Ken Johnson Date: Mon, 2 Nov 2020 15:26:58 -0800 Subject: [PATCH] needed to change to the wordpress folder to run the wp command --- post_install.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/post_install.sh b/post_install.sh index acf3100..e1c64a8 100755 --- a/post_install.sh +++ b/post_install.sh @@ -79,10 +79,6 @@ FLUSH PRIVILEGES; CREATE DATABASE ${DB}; EOF -# Make the default log directory -mkdir /var/log/zm -chown www:www /var/log/zm - else # Mysql <= 56 does not @@ -106,10 +102,6 @@ if [ -e "/etc/iocage-env" ] ; then echo "Using NAT Address: $IOCAGE_PLUGIN_IP" fi -#Use wp to complete the Wordpress installation -su -m www -c "wp core config --dbname=$DB --dbuser=$USER --dbpass=$PASS" -su -m www -c "wp core install --title=$DB --admin_user=$WPUSER --admin_password=$WPPASS --admin_email=ken@blkdoor.com - # create sessions tmp dir outside nextcloud installation mkdir -p /usr/local/www/wordpress-sessions-tmp >/dev/null 2>/dev/null chmod o-rwx /usr/local/www/wordpress-sessions-tmp @@ -119,6 +111,11 @@ chmod -R o-rwx /usr/local/www/wordpress #updater needs this chown -R www:www /usr/local/www/wordpress +#Use wp to complete the Wordpress installation +cd /usr/local/www/wordpress +su -m www -c "wp core config --dbname=$DB --dbuser=$USER --dbpass=$PASS" +su -m www -c "wp core install --title=$DB --admin_user=$WPUSER --admin_password=$WPPASS --admin_email=ken@blkdoor.com + #restart the services to make sure we have pick up the new permission service php-fpm restart 2>/dev/null #nginx restarts to fast while php is not fully started yet