#!/usr/bin/env bash # This hook is part of ncc. It creates a marker file on new cert deployments, # so that ncc knows when to reload the cluster. deploy_cert() { touch /etc/autossl/trigger; } deploy_ocsp() { touch /tmp/ncc-ssl-trigger; } startup_hook() { [ -f /tmp/ncc-ssl-trigger ] && rm /tmp/ncc-ssl-trigger || true; } fn_exists() { declare -F "$1" > /dev/null; } HANDLER="$1"; shift if fn_exists "$HANDLER"; then "$HANDLER" "$@"; fi