From: Marcin Krol Date: Sat, 28 Oct 2017 12:25:58 +0000 (+0000) Subject: - use bash X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=e44fc66b805fb82e1eeac00fd778d02f214464c7;p=packages%2Fdehydrated.git - use bash --- 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 diff --git a/hook.global b/hook.global index e3102ba..fb3b851 100644 --- a/hook.global +++ b/hook.global @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Example global hook to update/reload supported services diff --git a/hook.sh b/hook.sh index 2025617..51c35b5 100755 --- a/hook.sh +++ b/hook.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Directory with per certificate hook scripts called after # certificate is successfully deployed