This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2.7 | |
import urllib | |
from twisted.internet import protocol | |
from twisted.internet import defer | |
from twisted.web.http_headers import Headers | |
from twisted.internet import reactor | |
from twisted.web.client import Agent | |
from twisted.web.iweb import IBodyProducer | |
from zope.interface import implements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clone letsenrypt to /opt | |
sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
# To Create Certs | |
sudo -H /opt/letsencrypt/letsencrypt-auto certonly --standalone -d site.com -d www.site.com | |
# To Renew | |
sudo -H /opt/letsencrypt/letsencrypt-auto certonly --standalone --renew-by-default -d site.com -d www.site.com | |
# To Autorenew |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------------------------------------------- | |
/etc/systemd/system/renew-letsencrypt.service : | |
----------------------------------------------- | |
[Unit] | |
Description=Renew Let's Encrypt certificates | |
[Service] | |
Type=oneshot | |
# check for renewal, only start/stop nginx if certs need to be renewed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"os/exec" | |
"strings" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"os/exec" | |
"strings" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"io" | |
"log" | |
"os" | |
"path" |