ebekker / ACMESharp

An ACME client library and PowerShell client for the .NET platform (Let's Encrypt)
https://pkisharp.github.io/ACMESharp-docs/
1.21k stars 184 forks source link

Automagic Timed Event Script #47

Open tracker1 opened 8 years ago

tracker1 commented 8 years ago

Would be cool to see a script that can run as a timed event that will configure any websites that don't have https, then for all that do, fetch a new cert if it's been more than a month since the last cert.

ebekker commented 8 years ago

Support for auto-update, a la registration of a Scheduled Task has been part of the plan from the original project design right from the start. So you'll be able to configure a task that will automatically go out and refresh the cert and install it and/or notify (email, IM) of its progress. It will pby do a daily check and fire off, say, 15 days prior to cert expiration by default, but will pby be configurable.

ebekker commented 8 years ago

As far as the first part of your request -- the auto configuration of any websites that don't have HTTPS -- that one may not be as universally applicable and you pby need a bunch of options to cater to your needs, for example, do you need to specify a whitelist and/or blacklist for which sitest to include or exclude.

However, that's the beauty of rolling this out as a POSH module -- with PS, you can roll your own such behavior very easily, I would guess with about 4-7 lines of code and it can be perfectly tailored to your needs.