#!/usr/bin/env bash

if [ $# -ne 1 ]; then
    echo this program expects 1 single argument
    exit 1
fi

mkcert $1
sudo mkdir -p /etc/letsencrypt/live/$1/
sudo mv $1-key.pem /etc/letsencrypt/live/$1/privkey.pem
sudo mv $1.pem /etc/letsencrypt/live/$1/fullchain.pem
