diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-03-31 09:54:17 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-03-31 09:54:17 +0200 |
commit | 5e168de67e4b69a1be8655236f8ec40f639f6882 (patch) | |
tree | 6baa4723df41601004db88b34d71a0d1a4e81ddf /nginx.sh | |
parent | 3d7eafe479f661495f7116e05955e63e143edfe8 (diff) |
nginx.sh
Diffstat (limited to 'nginx.sh')
-rwxr-xr-x | nginx.sh | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -17,6 +17,7 @@ if [ ! -e "$PIN" ]; then fi source ./config.sh +source ./utils.sh echo "This installs Nginx." echo "Press <Return> to continue, or <Ctrl+C> to abort." @@ -37,12 +38,16 @@ else fi if ! $NGINX_DONE; then - $PIN --auto-download --auto --prefix="$NGINX_DEST" - cd "$RUBY_DEST/lib/ruby/gems/1.8/gems/" + if ! $PIN --auto-download --auto --prefix="$NGINX_DEST">>$LOG 2>&1 + printf "%25s%15s\n" "'Install'" "FAIL" + exit 1 + fi + printf "%25s%15s\n" "'Install'" "DONE" + cd "$RUBY_DEST/lib/ruby/gems/1.8/gems/" >>$LOG 2>&1 passenger=`ls -d passenger*`; - cd - + cd - >>$LOG 2>&1 servername=`hostname` - sed -e "s/PASSENGER/$passenger/;s/SERVERNAME/$servername/;s/RUBY_DEST/$RUBY_DEST/" ./nginx.conf > $NGINX_DEST/nginx.conf + sed -e "s/PASSENGER/$passenger/;s/SERVERNAME/$servername/;s/RUBY_DEST/$RUBY_DEST/" ./nginx.conf > $NGINX_DEST/nginx.conf 2>>$LOG fi cd "$DIR" |