diff --git a/99-final/sitebuilder.sh b/99-final/sitebuilder.sh index 2aa325c..da0c7fe 100644 --- a/99-final/sitebuilder.sh +++ b/99-final/sitebuilder.sh @@ -27,11 +27,11 @@ if [ "$SITE_ROOT" ]; then mkdir -p $DOC_ROOT/$SITE_ROOT/pages cd $DOC_ROOT/$SITE_ROOT/pages cp -av $TEMPLATE . - db_to_replace=`grep '^\$dbname' $DOC_ROOT/$SITE_ROOT/pages/index.php | awk {'print $3'} | sed s,\",,g` + db_to_replace=`grep '^\$srv_dbname' $DOC_ROOT/$SITE_ROOT/pages/index.php | awk {'print $3'} | sed s,\",,g` sed -e "s,$db_to_replace,$SITE_DB,g" -i $DOC_ROOT/$SITE_ROOT/pages/index.php - ip_to_replace=`grep '^\$host' $DOC_ROOT/$SITE_ROOT/pages/index.php | awk {'print $3'} | sed s,\",,g` + ip_to_replace=`grep '^\$srv_host' $DOC_ROOT/$SITE_ROOT/pages/index.php | awk {'print $3'} | sed s,\",,g` sed -e "s,$ip_to_replace,$DB_IP,g" -i $DOC_ROOT/$SITE_ROOT/pages/index.php - port_to_replace=`grep '^\$port' $DOC_ROOT/$SITE_ROOT/pages/index.php | awk {'print $3'} | sed s,\",,g` + port_to_replace=`grep '^\$srv_port' $DOC_ROOT/$SITE_ROOT/pages/index.php | awk {'print $3'} | sed s,\",,g` sed -e "s,$port_to_replace,$DB_PORT,g" -i $DOC_ROOT/$SITE_ROOT/pages/index.php else exit 1;