Script which installs NGINX on Debian Jessie amd64 systems.
Last active
March 31, 2016 15:48
-
-
Save mindvox/bc2954cf0095ccfa0ebcbb4ba385c888 to your computer and use it in GitHub Desktop.
Debian NGINX Web Server Install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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