diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-04-07 11:10:16 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-04-07 11:10:16 +0200 |
commit | 1d8064845db4d459ec32c18c3aa0ebfae7708e36 (patch) | |
tree | 47540c501871cbbd49bc355d222c16ac07a597c8 /nginx.sh | |
parent | 9e87646fd61457d8f8a904dcf481f02fc87fff6b (diff) |
Fixed nginx conf
Diffstat (limited to 'nginx.sh')
-rwxr-xr-x | nginx.sh | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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" |