more tweaks to gmg
[fai-configs.git] / files / etc / init.d / request-letsencrypt / DEFAULT
index e29039dcbf6e1fce6f521268159ffdb755c17b90..7e333606af81e95837053218830ae60ab24f264e 100755 (executable)
@@ -1,7 +1,17 @@
 #!/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