summaryrefslogtreecommitdiff
path: root/nginx.sh
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-04-07 11:10:16 +0200
committerAndreas Maunz <andreas@maunz.de>2011-04-07 11:10:16 +0200
commit1d8064845db4d459ec32c18c3aa0ebfae7708e36 (patch)
tree47540c501871cbbd49bc355d222c16ac07a597c8 /nginx.sh
parent9e87646fd61457d8f8a904dcf481f02fc87fff6b (diff)
Fixed nginx conf
Diffstat (limited to 'nginx.sh')
-rwxr-xr-xnginx.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/nginx.sh b/nginx.sh
index 1c87d05..b312e5e 100755
--- a/nginx.sh
+++ b/nginx.sh
@@ -19,6 +19,13 @@ if [ ! -e "$PIN" ]; then
exit 1
fi
+GIT="`which git`"
+if [ ! -e "$GIT" ]; then
+ echo "'git' missing. Install 'git' first. Aborting..."
+ exit 1
+fi
+
+
LOG="/tmp/`basename $0`-log.txt"
echo
@@ -43,6 +50,7 @@ cd "$RUBY_DEST/lib/ruby/gems/1.8/gems/" >>$LOG 2>&1
passenger=`ls -d passenger*`
cd - >>$LOG 2>&1
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,\" ./nginx.conf" && run_cmd "$cmd" "Config"
cmd="cp ./nginx.conf \"$NGINX_DEST/conf\"" && run_cmd "$cmd" "Copy"