recipe_alpine_certbot.ts view source
(options?: CertbotReloadNginxHookOptions | undefined): RunPartsFile import {alpine_certbot_reload_nginx_hook} from '@fuzdev/zap/recipe_alpine_certbot.js'; Build the certbot deploy hook that reloads nginx via OpenRC after a renewal, ready
to spread into a zap.file({...}).
rc-service --ifstarted exits 0 without running the command when the service isn't
started, so the hook is a successful no-op while nginx is stopped (the first
--standalone issuance). It is named by its full path, /sbin/rc-service, so the
hook doesn't rest on the PATH certbot was started with (BusyBox crond's holds
/sbin; a hand-run certbot's may not). A failing hook is reported by certbot and
doesn't undo the renewal.
options?
returns
RunPartsFile a spreadable {path, mode, content} for an inline file resource.
throws
when- `options.name` holds a character outside `[A-Za-z0-9_-]`