Skip to content

Instantly share code, notes, and snippets.

@mindvox
Last active March 31, 2016 15:48
Show Gist options
  • Save mindvox/bc2954cf0095ccfa0ebcbb4ba385c888 to your computer and use it in GitHub Desktop.
Save mindvox/bc2954cf0095ccfa0ebcbb4ba385c888 to your computer and use it in GitHub Desktop.
Debian NGINX Web Server Install

NGINX Web Server Install

Script which installs NGINX on Debian Jessie amd64 systems.

#!/bin/sh
##
# Install NGINX web server
#
set -e
user="$(id -un 2>/dev/null || true)"
if [ "$user" != 'root' ]; then
echo "This script must be run as root." \
; exit 1
else
apt-get update \
&& apt-get install --yes nginx \
&& echo 'NGINX install successful' ; exit 0 \
|| echo 'Please contact support <[email protected]>' ; exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment