more tweaks to gmg
[fai-configs.git] / files / etc / init.d / request-letsencrypt / DEFAULT
... / ...
CommitLineData
1#!/bin/bash
2
3if [ ! -d /etc/letsencrypt/archive/HOSTNAME_TOKEN ]; then
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
10 cd /srv/letsencrypt
11 ./letsencrypt-auto certonly --standalone --agree-tos --email LETSENCRYPT_EMAIL_TOKEN -d HOSTNAME_TOKEN -d SERVERNAME_TOKEN
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
16fi
17