#!/bin/bash

mkdir /srv/www/letsencrypt
chown apache:apache /srv/www/letsencrypt

# service apache2 stop
# --standalone
sudo -u apache \
 certbot certonly --webroot \
 --agree-tos --non-interactive \
 -m gavenkoa@gmail.com \
 -w /srv/www/letsencrypt \
 --cert-name defun.work \
 -d 2048.defun.work
# service apache2 start

# https://wiki.debian.org/LetsEncrypt
# python3-certbot-apache - Apache plugin for Certbot

# systemctl reload apache2
# sudo certbot --apache --agree-tos --redirect -m youremail@email.com -d domainname.com -d www.domainname.com
