FreeBSD Bugzilla – Attachment 202051 Details for
Bug 221043
security/py-certbot: Add periodic script for renewing certificates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Modified version of Alan's patch
security_py-certbot.patch (text/plain), 2.12 KB, created by
Yasuhiro Kimura
on 2019-02-15 21:24:23 UTC
(
hide
)
Description:
Modified version of Alan's patch
Filename:
MIME Type:
Creator:
Yasuhiro Kimura
Created:
2019-02-15 21:24:23 UTC
Size:
2.12 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 492933) >+++ Makefile (working copy) >@@ -3,6 +3,7 @@ > > PORTNAME= certbot > PORTVERSION= ${ACME_VERSION} >+PORTREVISION= 1 > PORTEPOCH= 1 > CATEGORIES= security python > MASTER_SITES= CHEESESHOP >@@ -33,10 +34,17 @@ > USE_PYTHON= autoplist concurrent distutils > > NO_ARCH= yes >+SUB_FILES= 500.certbot >+PLIST_FILES= etc/periodic/weekly/500.certbot > > post-patch: > @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/certbot/compat.py > >+post-install: >+ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/weekly >+ ${INSTALL_SCRIPT} ${WRKDIR}/500.certbot \ >+ ${STAGEDIR}${PREFIX}/etc/periodic/weekly >+ > do-test: > @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test > >Index: files/500.certbot.in >=================================================================== >--- files/500.certbot.in (nonexistent) >+++ files/500.certbot.in (working copy) >@@ -0,0 +1,51 @@ >+#!/bin/sh >+# >+# $FreeBSD$ >+# >+# Automatically renew Let's Encrypt certificates each month >+# >+# Add the following lines to /etc/periodic.conf: >+# >+# weekly_certbot_enable (bool): Set to "NO" by default >+# weekly_certbot_service (str): If defined, certbot will try to >+# shutdown this this service before >+# renewing the certificate, and restart >+# it afterwards. For example, set to >+# "nginx" or "apache24" >+ >+# If there is a global system configuration file, suck it in. >+# >+if [ -r /etc/defaults/periodic.conf ] >+then >+ . /etc/defaults/periodic.conf >+ source_periodic_confs >+fi >+ >+echo "running certbot? " >+case "$weekly_certbot_enable" in >+ [Yy][Ee][Ss]) >+ PRE_HOOK="" >+ POST_HOOK="" >+ if [ -n "$weekly_certbot_service" ] >+ then >+ if service "$weekly_certbot_service" onestatus >+ then >+ PRE_HOOK="service $weekly_certbot_service onestop" >+ POST_HOOK="service $weekly_certbot_service onestart" >+ fi >+ fi >+ >+ anticongestion >+ if %%LOCALBASE%%/bin/certbot renew --pre-hook "$PRE_HOOK" \ >+ --post-hook "$POST_HOOK" \ >+ --no-random-sleep-on-renew >+ then >+ rc=0 >+ else >+ rc=1 >+ fi >+ ;; >+ *) rc=0;; >+esac >+ >+exit $rc
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 221043
:
184762
|
184997
|
185994
|
202051
|
202052
|
202464