#!/usr/bin/env bash # This script uses the concept at https://certbot.eff.org/#ubuntuxenial-other # but overcomes the problem I consistently have of the server (at eff.org) # not being able to connect to this machine. Given x_ prefix to correct github sorting. mkdir -p /tmp/www cd /tmp/www sudo python -m SimpleHTTPServer 80 & http_pid=$! sudo certbot certonly \ --agree-tos \ --webroot \ --webroot-path $PWD \ --email $EMAIL \ --domain $DOMAIN sudo kill --signal SIGINT $http_pid cd -