#!/bin/bash # https://gist.github.com/jonsamp/587b78b7698be7c7fd570164a586e6b7 cd ../home/certbot/live/localhost ../home/certbot/conf/live/localhost openssl genrsa -out ../home/certbot/conf/live/localhost/localhost.key 2048 openssl req -new -x509 -key ../home/certbot/conf/live/localhost/localhost.key -out ../home/certbot/conf/live/localhost/localhost.crt -days 3650 -subj /CN=localhost sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ../home/certbot/conf/live/localhost/localhost.crt echo "You're ready to use https on localhost 💅"