Last active
January 2, 2016 13:49
-
-
Save d5/8312325 to your computer and use it in GitHub Desktop.
curl -L "https://gist.sh/8312325" | sudo sh
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 | |
# Params | |
# update_all: whether or not to update all packages | |
info() { echo "INFO: $1"; } | |
die() { echo "ERROR: $1. Aborting!"; exit 1; } | |
# stop nginx | |
curl -L "https://gist.sh/8313139?op=stop" | sudo sh 2> /dev/null | |
{% if update_all %} | |
# update all | |
curl -L "https://gist.sh/8313028" | sudo sh | |
{% endif %} | |
# install nginx | |
curl -L "https://gist.sh/8313139?op=install" | sudo sh | |
# start nginx | |
curl -L "https://gist.sh/8313139?op=start" | sudo sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment