summaryrefslogtreecommitdiff
path: root/nginx.sh
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-04-27 17:14:09 +0200
committerAndreas Maunz <andreas@maunz.de>2011-04-27 17:14:09 +0200
commite2dc50e08e9245e401ab5726f04706c825e9deaf (patch)
tree4f4d2567b934a8a89d2265a842b4d1c8696832b3 /nginx.sh
parentb59d27e35c220180c8e9717b98a39073ecc6a55e (diff)
Fixed some issues
Diffstat (limited to 'nginx.sh')
-rwxr-xr-xnginx.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/nginx.sh b/nginx.sh
index 36a84df..6b10a5c 100755
--- a/nginx.sh
+++ b/nginx.sh
@@ -54,5 +54,16 @@ $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="cp ./nginx.conf \"$NGINX_DEST/conf\"" && run_cmd "$cmd" "Copy"
+if [ ! -f $NGINX_CONF ]; then
+ echo "if ! echo \"\$PATH\" | grep \"$NGINX_DEST\">/dev/null 2>&1; then export PATH=$NGINX_DEST/sbin:\$PATH; fi" >> "$NGINX_CONF"
+ echo "Nginx configuration has been stored in '$NGINX_CONF'."
+
+ if ! grep ". \"$NGINX_CONF\"" $OT_UI_CONF; then
+ echo ". \"$NGINX_CONF\"" >> $OT_UI_CONF
+ fi
+
+fi
+
+
cd "$DIR"