diff --git a/post_install.sh b/post_install.sh index 5e28606..1f66a0d 100755 --- a/post_install.sh +++ b/post_install.sh @@ -53,6 +53,7 @@ mv wp-cli.phar /usr/local/bin/wp USER="dbadmin" DB="wordpress" WPUSER="wpadmin" +IPADDR=`ifconfig epair0b | awk '/inet/ {gsub("addr:", "", $2); print $2}'` # Save the config values echo "$DB" > /root/dbname @@ -114,7 +115,7 @@ 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\"" +su -m www -c "wp core install --url=\"${IPADDR}\" --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 @@ -129,3 +130,4 @@ echo "Database Password: $PASS" >> /root/PLUGIN_INFO echo "Wordpress Admin User: $WPUSER" >> /root/PLUGIN_INFO echo "Wordpress Admin Password: $WPPASS" >> /root/PLUGIN_INFO +echo "IP Addr: $IPADDR" >> /root/PLUGIN_INFO