summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnginx.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/nginx.sh b/nginx.sh
index 776acf0..498dd0b 100755
--- a/nginx.sh
+++ b/nginx.sh
@@ -41,7 +41,9 @@ if ! $NGINX_DONE; then
passenger=`ls -d passenger*`
cd - >>$LOG 2>&1
servername=`hostname`
- cmd="sed -i -e \"s/PASSENGER/$passenger/;s/SERVERNAME/$servername/;s/RUBY_DEST/$RUBY_DEST/;s/NGINX_DEST/$NGINX_DEST/\" ./nginx.conf" && run_cmd "$cmd" "Config"
+ ruby_dest=`echo $RUBY_DEST | sed 's/\//\\\//g'`
+ nginx_dest=`echo $NGINX_DEST | sed 's/\//\\\//g'`
+ cmd="sed -i -e \"s/PASSENGER/$passenger/;s/SERVERNAME/$servername/;s/RUBY_DEST/$ruby_dest/;s/NGINX_DEST/$nginx_dest/\" ./nginx.conf" && run_cmd "$cmd" "Config"
cmd="cp ./nginx.conf \"$NGINX_DEST/conf\"" && run_cmd "$cmd" "Copy"
fi