瀏覽代碼

Let cake locate nginx files and connect to database

In the transition to bash-based setup files we forgot
to address
1) nginx was no longer located at /usr/local/......
2) a $ was left off of the database host replacement, so cake
was literally trying to connect to host {DBHOST}
3) lots of unnecessary quotation marks
Hamilton Turner 11 年之前
父節點
當前提交
4ce515da17
共有 1 個文件被更改,包括 6 次插入5 次删除
  1. 6 5
      frameworks/PHP/cakephp/setup.sh

+ 6 - 5
frameworks/PHP/cakephp/setup.sh

@@ -1,11 +1,12 @@
 #!/bin/bash
 #!/bin/bash
 
 
-sed -i "s|'host' => '.*'|'host' => '\"{DBHOST}\"'|g" app/Config/database.php
-sed -i 's|REDISSERVER|'"${DBHOST}"'|g' app/Config/core.php
-sed -i 's|".*/FrameworkBenchmarks/cakephp|"'"${TROOT}"'|g' deploy/cake
-sed -i 's|Directory .*/FrameworkBenchmarks/cakephp|Directory '"${TROOT}"'|g' deploy/cake
-sed -i 's|root .*/FrameworkBenchmarks/cakephp|root '"${TROOT}"'|g' deploy/nginx.conf
 
 
 $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
 $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+sed -i "s|'host' => '.*'|'host' => '${DBHOST}'|g" app/Config/database.php
+sed -i 's|REDISSERVER|'${DBHOST}'|g' app/Config/core.php
+sed -i 's|".*/FrameworkBenchmarks/cakephp|"'${TROOT}'|g' deploy/cake
+sed -i 's|Directory .*/FrameworkBenchmarks/cakephp|Directory '${TROOT}'|g' deploy/cake
+sed -i 's|root .*/FrameworkBenchmarks/cakephp|root '${TROOT}'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'${IROOT}'/nginx/|g' deploy/nginx.conf
 
 
 $NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf
 $NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf