#!/bin/bash
if [ ! -d /etc/letsencrypt/archive/HOSTNAME_TOKEN ]; then
+
+ # Nasty hack for getting port 443/80 if needed
+ /etc/init.d/nginx stop &> /dev/null
+ /etc/init.d/apache2 stop &> /dev/null
+
+ # Lets get us some SSL
cd /srv/letsencrypt
./letsencrypt-auto certonly --standalone --agree-tos --email LETSENCRYPT_EMAIL_TOKEN -d HOSTNAME_TOKEN -d SERVERNAME_TOKEN
+
+ # Nasty hack for putting thoes services back online, okay :)
+ /etc/init.d/nginx start &> /dev/null
+ /etc/init.d/apache2 start &> /dev/null
fi