installing console-common uninstalls cryptsetup
[fai-configs.git] / files / etc / init.d / request-letsencrypt / DEFAULT
CommitLineData
ef9a3577
LMM
1#!/bin/bash
2
1367fe94 3if [ ! -d /etc/letsencrypt/archive/HOSTNAME_TOKEN ]; then
e6a9ff79
LMM
4
5 # Nasty hack for getting port 443/80 if needed
6 /etc/init.d/nginx stop &> /dev/null
7 /etc/init.d/apache2 stop &> /dev/null
8
9 # Lets get us some SSL
ef9a3577 10 cd /srv/letsencrypt
a6084b7c 11 ./letsencrypt-auto certonly --standalone --agree-tos --email LETSENCRYPT_EMAIL_TOKEN -d HOSTNAME_TOKEN -d SERVERNAME_TOKEN
e6a9ff79
LMM
12
13 # Nasty hack for putting thoes services back online, okay :)
14 /etc/init.d/nginx start &> /dev/null
15 /etc/init.d/apache2 start &> /dev/null
ef9a3577
LMM
16fi
17