X-Git-Url: https://git.tld-linux.org/?p=packages%2Fdehydrated.git;a=blobdiff_plain;f=hook.functions;fp=hook.functions;h=20d8d97d5ea43e367ca8b894e29ebcb9af29804d;hp=190b0d9685d0ad5273706efe8bab0ec47e3e779f;hb=e44fc66b805fb82e1eeac00fd778d02f214464c7;hpb=99664be1df538e0d613685d223dde3e7cef8eda4 diff --git a/hook.functions b/hook.functions index 190b0d9..20d8d97 100644 --- a/hook.functions +++ b/hook.functions @@ -1,5 +1,12 @@ -#!/bin/sh +#!/bin/bash +# This file contains base functions for dehydrated hook scripts. +# Please do not edit this file! It will be overwritten by package updates! +# If you need to implement your own functions, take a look at +# custom_functions file. + +# This function checks for per certificate hook scripts in hooks.d directory. +# If not found, it executes global hook script instead. deploy_cert() { local DOMAIN="${1}" KEYFILE="${2}" CERTFILE="${3}" FULLCHAINFILE="${4}" CHAINFILE="${5}" TIMESTAMP="${6}" if [[ -n "${HOOKS_D}" ]]; then @@ -50,7 +57,7 @@ unchanged_cert() { echo " + Hook: ${HANDLER}: Nothing to do..." } -# concat file atomic way +# Function to concat files atomic way to avoid MITM problems atomic_concat() { local file=$1; shift > $file.new