summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-04-07 10:50:31 +0200
committerAndreas Maunz <andreas@maunz.de>2011-04-07 10:50:31 +0200
commit0c4a69141869c4573b5a27ec3a49d19a289e9a1b (patch)
treecb99fbc6414da0e8a27a92b854b60159e627edd8
parentd002a2770a99e7e8b36bf98618575ecc13f86cd0 (diff)
Fixed nginx conf
-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