From 88e3a50254240f7f83f2645dcd8e3709d8a80790 Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Tue, 9 Oct 2012 20:42:36 +0530 Subject: [PATCH] Install Nginx --- setup/install-nginx.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 setup/install-nginx.sh diff --git a/setup/install-nginx.sh b/setup/install-nginx.sh new file mode 100755 index 00000000..c558d091 --- /dev/null +++ b/setup/install-nginx.sh @@ -0,0 +1,28 @@ +#!/bin/bash + + + +# Capture Errors +OwnError() +{ + #echo $@ >&2 + clear + echo -e "[ $0 ][ `date` ] \033[31m $@ \e[0m" | tee -ai /var/log/easyengine/error.log + exit 100 +} + + +# Install Python Software Properties +sudo apt-get -y install python-software-properties || OwnError "Unable To Install Python Software Properties :(" + +# Add Nginx Launchpad Repository +sudo add-apt-repository ppa:nginx/stable || OwnError "Unable To Add Nginx Launchpad Repository :(" + +# Update The APT Cache +sudo apt-get update || OwnError "Unable To Update APT Cache :(" + +# Install Nginx +sudo apt-get -y install nginx || OwnError "Unable To Install Nginx :(" + +# Check Nginx Version +nginx -v || OwnError "Unable To Detect Nginx Version :("