Add --renew-hook param to letsencrypt_cert type.
This commit is contained in:
parent
c76637242f
commit
47399bfa9f
4 changed files with 21 additions and 3 deletions
|
@ -25,23 +25,32 @@ OPTIONAL PARAMETERS
|
|||
-------------------
|
||||
None.
|
||||
|
||||
|
||||
OPTIONAL MULTIPLE PARAMETERS
|
||||
----------------------------
|
||||
renew-hook
|
||||
Renew hook command directly passed to certbot in cron job.
|
||||
|
||||
EXAMPLES
|
||||
--------
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
__letsencrypt_cert example.com --webroot /data/letsencrypt/root
|
||||
__letsencrypt_cert example.com --admin-email root@example.com --webroot /data/letsencrypt/root
|
||||
|
||||
__letsencrypt_cert example.com --admin-email root@example.com --webroot /data/letsencrypt/root --renew-hook "service nginx reload"
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||
Kamila Součková <kamila--@--ksp.sk>
|
||||
Darko Poljak <darko.poljak--@--gmail.com>
|
||||
|
||||
|
||||
COPYING
|
||||
-------
|
||||
Copyright \(C) 2017 Nico Schottelius, Kamila Součková. You can redistribute it
|
||||
Copyright \(C) 2017 Nico Schottelius, Kamila Součková, Darko Poljak. You can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
|
|
@ -64,9 +64,16 @@ case "$os" in
|
|||
;;
|
||||
esac
|
||||
|
||||
renew_hook_param="$__object/parameter/renew-hook"
|
||||
renew_hook=""
|
||||
if [ -f "$renew_hook_param" ]; then
|
||||
while read hook; do
|
||||
renew_hook="$renew_hook --renew-hook \"$hook\""
|
||||
done < "$renew_hook_param"
|
||||
fi
|
||||
|
||||
__cron letsencrypt-certbot \
|
||||
--user root \
|
||||
--command "$certbot_fullpath renew -q" \
|
||||
--command "$certbot_fullpath renew -q $renew_hook" \
|
||||
--hour 0 \
|
||||
--minute 47
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
renew-hook
|
|
@ -19,6 +19,7 @@ next:
|
|||
* Type __motd: Support reading from stdin (Jonas Weber)
|
||||
* Type __issue: Support reading from stdin (Jonas Weber)
|
||||
* Type __package_apt: Add support for --version parameter (Darko Poljak)
|
||||
* Type __letsencrypt_cert: Add --renew-hook parameter(Darko Poljak)
|
||||
|
||||
4.7.3: 2017-11-10
|
||||
* Type __ccollect_source: Add create destination parameter (Dominique Roux)
|
||||
|
|
Loading…
Reference in a new issue