Skip to content

Instantly share code, notes, and snippets.


Ed Schipul eschipul

View GitHub Profile
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.
View ngxdis
#!/usr/bin/env bash
if [ $EUID -ne 0 ]; then
echo "You must be root: \"sudo ngxdis\""
exit 1
# -z str: Returns True if the length of str is equal to zero.
if [ -z "$1" ]; then
echo "Please choose a site."