Skip to content

Instantly share code, notes, and snippets.

View eschipul's full-sized avatar

Ed Schipul eschipul

View GitHub Profile
@eschipul
eschipul / ngxdis
Last active November 15, 2017 22:38 — forked from fideloper/ngxdis
Nginx scripts for enable and disabling a site. This will create or destroy a symlink between a real config file in /etc/nginx/sites-available and a symlink in /etc/nginx/sites-enabled.
#!/usr/bin/env bash
if [ $EUID -ne 0 ]; then
echo "You must be root: \"sudo ngxdis\""
exit 1
fi
# -z str: Returns True if the length of str is equal to zero.
if [ -z "$1" ]; then
echo "Please choose a site."