summaryrefslogtreecommitdiff
path: root/nginx.sh
diff options
context:
space:
mode:
authordavor <vorgrimmlerdavid@gmx.de>2011-11-15 14:04:05 +0100
committerdavor <vorgrimmlerdavid@gmx.de>2011-11-15 14:05:10 +0100
commitc81acb5265a6a281d2757710f36e2e6e2e48986e (patch)
treeabefb05b9c0db20397b99af688bfa51f1cb2a76a /nginx.sh
parenta6c10ced1118e9b6513a1a24456c5bf35dda7b4b (diff)
Added support for PORT
Diffstat (limited to 'nginx.sh')
-rwxr-xr-xnginx.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/nginx.sh b/nginx.sh
index 800165e..3a872bc 100755
--- a/nginx.sh
+++ b/nginx.sh
@@ -53,6 +53,11 @@ servername=`hostname`
$GIT checkout nginx.conf>>$LOG 2>&1
cmd="sed -i -e \"s,PASSENGER,$passenger,;s,SERVERNAME,$servername,;s,RUBY_DEST,$RUBY_DEST,;s,NGINX_DEST,$NGINX_DEST,;s,WWW_DEST,$WWW_DEST,\" ./nginx.conf" && run_cmd "$cmd" "Config"
cmd="sed -i -e \"s,USER,`whoami`,\" ./nginx.conf" && run_cmd "$cmd" "User"
+PORT=`echo "$PORT" | sed 's/^.//g'`
+if [ -z "$PORT" ]; then
+ PORT=80
+fi
+cmd="sed -i -e \"s,PORT,$PORT,\" ./nginx.conf" && run_cmd "$cmd" "Port"
cmd="cp ./nginx.conf \"$NGINX_DEST/conf\"" && run_cmd "$cmd" "Copy"
if [ ! -f $NGINX_CONF ]; then