]> TLD Linux GIT Repositories - packages/dehydrated.git/blobdiff - hook.functions
- use bash
[packages/dehydrated.git] / hook.functions
index 190b0d9685d0ad5273706efe8bab0ec47e3e779f..20d8d97d5ea43e367ca8b894e29ebcb9af29804d 100644 (file)
@@ -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