Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert script to use acme.sh hooks/commands and built-in --cron #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dotsam
Copy link

@dotsam dotsam commented Sep 16, 2018

This PR largely just chops up the existing script into multiple files that can be used as hook/commands by acme.sh. The files are as follows:

  1. A setup.sh script that does the initial issuing of the certificate. It also now spits out the configuration commands at the end. Once used, this file isn't needed anymore.
  2. A pre-hook.sh script that stops the built-in GUI, sets up the temporary lighttpd instance, and firewall rules
  3. A post-hook.sh script which puts things back the way they were
  4. A reloadcmd.sh which combines the cert and key and copies the CA cert

With these in place, it's possible to use acme.sh's built-in --cron option which doesn't do anything if the certificate doesn't need to be renewed, thus preventing unneeded restarts of the GUI/web server.

I've tried to avoid hard-coding paths as much as possible in case anyone wanted to move the scripts to a different location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant