Files
rpg.ascorrea.com/root/create-localhost-certs.sh
2023-04-01 12:28:58 -05:00

9 lines
579 B
Bash

#!/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 💅"