|
|
@ -31,8 +31,8 @@ if [ "$SITE_ROOT" ]; then |
|
|
|
sed -e "s,$db_to_replace,$SITE_DB,g" -i $DOC_ROOT/$SITE_ROOT/pages/dbconnection.php |
|
|
|
ip_to_replace=`grep '^\$host' $DOC_ROOT/$SITE_ROOT/pages/dbconnection.php | awk {'print $3'} | sed s,\",,g` |
|
|
|
sed -e "s,$ip_to_replace,$DB_IP,g" -i $DOC_ROOT/$SITE_ROOT/pages/dbconnection.php |
|
|
|
port_to_replace=`grep '^\$dbname' $DOC_ROOT/$SITE_ROOT/pages/dbconnection.php | awk {'print $3'} | sed s,\",,g` |
|
|
|
sed -e "s,$ip_to_replace,$DB_IP,g" -i $DOC_ROOT/$SITE_ROOT/pages/dbconnection.php |
|
|
|
port_to_replace=`grep '^\$port' $DOC_ROOT/$SITE_ROOT/pages/dbconnection.php | awk {'print $3'} | sed s,\",,g` |
|
|
|
sed -e "s,$port_to_replace,$DB_PORT,g" -i $DOC_ROOT/$SITE_ROOT/pages/dbconnection.php |
|
|
|
else |
|
|
|
exit 1; |
|
|
|
fi |
|
|
|