30 lines
822 B
Bash
30 lines
822 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
set -xe
|
||
|
|
||
|
sudo mv /tmp/do.ini ~/do.ini
|
||
|
sudo certbot certonly \
|
||
|
-n \
|
||
|
--agree-tos \
|
||
|
-m 'jeremy.dormitzer@gmail.com' \
|
||
|
--dns-digitalocean \
|
||
|
--dns-digitalocean-credentials ~/do.ini \
|
||
|
--dns-digitalocean-propagation-seconds 30 \
|
||
|
-d '*.jeremydormitzer.com' \
|
||
|
-d 'jeremydormitzer.com'
|
||
|
|
||
|
sudo mv /tmp/nginx.conf /etc/nginx/nginx.conf
|
||
|
sudo mkdir -p /var/log/nginx
|
||
|
sudo systemctl enable nginx
|
||
|
|
||
|
sudo mv /tmp/certbot-renew.timer /etc/systemd/system/
|
||
|
sudo mv /tmp/certbot-renew.service /etc/systemd/system/
|
||
|
sudo systemctl enable certbot-renew.timer
|
||
|
|
||
|
sudo mv /tmp/nginx-restart.timer /etc/systemd/system/
|
||
|
sudo mv /tmp/nginx-restart.service /etc/systemd/system/
|
||
|
sudo systemctl enable nginx-restart.timer
|
||
|
|
||
|
sudo mv /tmp/sshd_config /etc/ssh/sshd_config
|
||
|
sudo systemctl restart sshd
|