Skip to content

Instantly share code, notes, and snippets.

@d5
Last active January 2, 2016 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d5/8312325 to your computer and use it in GitHub Desktop.
Save d5/8312325 to your computer and use it in GitHub Desktop.
curl -L "https://gist.sh/8312325" | sudo sh
#!/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