Message ID | 1e6aa96a1ed21a5cad335ba2693f09b20a4767d4.1696512049.git.mirai@makinata.eu |
---|---|
State | New |
Headers | show |
Series | [bug#66360] doc: Use herd for cerbot deploy hook example. | expand |
Hi, Bruno Victal <mirai@makinata.eu> skribis: > * doc/guix.texi (Certificate Services): Replace PID file based example with > one using (gnu services herd). Rename %nginx-deploy-hook to > %certbot-deploy-hook. Applied, thanks! > +(define %certbot-deploy-hook > + (program-file "certbot-deploy-hook.scm" > + (with-imported-modules '((gnu services herd)) > + #~(begin > + (use-modules (gnu services herd)) > + (with-shepherd-action 'nginx ('reload) result result))))) Should we make it the default ‘deploy-hook’ value in <certificate-configuration>? I’ve always been frustrated that ‘certbot-service-type’ doesn’t quite work out of the box. Ludo’.
diff --git a/doc/guix.texi b/doc/guix.texi index 8c5697589f..c54bfc0154 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -31935,11 +31935,12 @@ Certificate Services must be a @code{certbot-configuration} record as in this example: @lisp -(define %nginx-deploy-hook - (program-file - "nginx-deploy-hook" - #~(let ((pid (call-with-input-file "/var/run/nginx/pid" read))) - (kill pid SIGHUP)))) +(define %certbot-deploy-hook + (program-file "certbot-deploy-hook.scm" + (with-imported-modules '((gnu services herd)) + #~(begin + (use-modules (gnu services herd)) + (with-shepherd-action 'nginx ('reload) result result))))) (service certbot-service-type (certbot-configuration @@ -31948,7 +31949,7 @@ Certificate Services (list (certificate-configuration (domains '("example.net" "www.example.net")) - (deploy-hook %nginx-deploy-hook)) + (deploy-hook %certbot-deploy-hook)) (certificate-configuration (domains '("bar.example.net"))))))) @end lisp