#!/bin/sh -e # It is expected that this defines hook_contents # Reasonable defaults hook_source="${__object}/parameter/${hook}-hook" hook_state="absent" hook_contents_head="#!/bin/sh -e" hook_contents_logic="" hook_contents_tail="" # Backwards compatibility # Remove this when renew-hook is removed # Falling back to renew-hook if deploy-hook is not passed if [ "${hook}" = "deploy" ] && [ ! -f "${hook_source}" ]; then hook_source="${__object}/parameter/renew-hook" fi if [ "${state}" = "present" ] && \ [ -f "${hook_source}" ]; then # This hook is to be installed, let's generate it with some # safety boilerplate # Since certbot runs all hooks for all renewal processes # (at each state for deploy, pre, post), it is up to us to # differentiate whether or not the hook must run hook_state="present" hook_contents_head="$(cat <> /dev/stderr exit 1 ;; esac hook_contents_tail="$(cat <