Skip to content

Instantly share code, notes, and snippets.

@chadlavi
Created April 26, 2018 18:09
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 chadlavi/9fef8701aef4628261f3b810a604f9df to your computer and use it in GitHub Desktop.
Save chadlavi/9fef8701aef4628261f3b810a604f9df to your computer and use it in GitHub Desktop.
Install certbot on Ubuntu 16.04
#!/bin/bash
# Install certbot on Ubuntu 16.04
# if parameter "run" is passed to the script like `ubuntu_16.04_certbot.sh run`, it also runs "sudo certbot certonly" after install
# cf. https://certbot.eff.org/lets-encrypt/ubuntuxenial-other
sudo apt-get update -y &&\
sudo apt-get install software-properties-common &&\
sudo add-apt-repository ppa:certbot/certbot &&\
sudo apt-get update -y &&\
sudo apt-get install certbot -y &&\
if [[ $1 = 'run' ]]; then
sudo certbot certonly
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment