Skip to content

Instantly share code, notes, and snippets.

@mihok
Created August 7, 2016 15:00
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 mihok/e557a47216db469594c963eb2816384b to your computer and use it in GitHub Desktop.
Save mihok/e557a47216db469594c963eb2816384b to your computer and use it in GitHub Desktop.
Nginx and Certbot provision scripts
#!/bin/bash
set -x;
apt-get update -y
apt-get install -y gnupg2
cd /opt
# Create our software directory
mkdir certbot
# If certbot didnt auto-install updates on use
# mkdir certbot-0.8.1
# cd certbot-0.8.1
# Download the binary
wget https://dl.eff.org/certbot-auto
# Download the signture
wget -N https://dl.eff.org/certbot-auto.asc
# Pull the Let's Encrypt public key from the keyserver
gpg2 --keyserver hkp://keys.gnupg.net --recv-key A2CFB51FA275A7286234E7B24D17C995CD9775F2
# Verify the signature and binaries
gpg2 --trusted-key 4D17C995CD9775F2 --verify certbot-auto.asc certbot-auto
# Make the binary executable
chmod a+x certbot-auto
# Create a symlink to access certbot(-auto) from anywhere
ln -s /opt/certbot/certbot-auto /usr/local/bin/certbot
#!/bin/bash
set -x;
apt-get update -y
apt-get install -y nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment