Skip to content

Instantly share code, notes, and snippets.

@danrossi
Created April 23, 2016 02:01
Show Gist options
  • Save danrossi/ee15e1ba84ba8b203bb18fba5cb876fb to your computer and use it in GitHub Desktop.
Save danrossi/ee15e1ba84ba8b203bb18fba5cb876fb to your computer and use it in GitHub Desktop.

Revisions

  1. danrossi created this gist Apr 23, 2016.
    10 changes: 10 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/bin/sh
    service nginx stop # or whatever your webserver is
    letsencrypt renew -nvv --standalone > /var/log/letsencrypt/renew.log 2>&1
    LE_STATUS=$?
    service nginx start # or whatever your webserver is
    if [ "$LE_STATUS" != 0 ]; then
    echo Automated renewal failed:
    cat /var/log/letsencrypt/renew.log
    exit 1
    fi