Created
August 7, 2016 15:00
-
-
Save mihok/e557a47216db469594c963eb2816384b to your computer and use it in GitHub Desktop.
Nginx and Certbot provision scripts
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/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 |
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/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