]> TLD Linux GIT Repositories - packages/dehydrated.git/commitdiff
- use bash
authorMarcin Krol <hawk@tld-linux.org>
Sat, 28 Oct 2017 12:25:58 +0000 (12:25 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Sat, 28 Oct 2017 12:25:58 +0000 (12:25 +0000)
hook.functions
hook.global
hook.sh

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
index e3102ba114733fb967ceafef41ee8312615f8c12..fb3b851f995a7588a8d796a2b7a774af2e52d8e5 100644 (file)
@@ -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 2025617099ab009a84a13bc84e2d1142ebfda837..51c35b58d2e58c827bd2219d47dfae42ea275743 100755 (executable)
--- 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