From 20a6ab3d1a8b4ee0d2bf58388cf8d5a1d473cb41 Mon Sep 17 00:00:00 2001 From: neilpang Date: Mon, 7 Nov 2016 20:59:10 +0800 Subject: [PATCH] find hook file in current dir first --- acme.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/acme.sh b/acme.sh index b07b1dc..e077d2e 100755 --- a/acme.sh +++ b/acme.sh @@ -2297,8 +2297,12 @@ _findHook() { _hookdomain="$1" _hookcat="$2" _hookname="$3" - - if [ -f "$LE_WORKING_DIR/$_hookdomain/$_hookname" ] ; then + + if [ -f "$_SCRIPT_HOME/$_hookdomain/$_hookname" ] ; then + d_api="$_SCRIPT_HOME/$_hookdomain/$_hookname" + elif [ -f "$_SCRIPT_HOME/$_hookdomain/$_hookname.sh" ] ; then + d_api="$_SCRIPT_HOME/$_hookdomain/$_hookname.sh" + elif [ -f "$LE_WORKING_DIR/$_hookdomain/$_hookname" ] ; then d_api="$LE_WORKING_DIR/$_hookdomain/$_hookname" elif [ -f "$LE_WORKING_DIR/$_hookdomain/$_hookname.sh" ] ; then d_api="$LE_WORKING_DIR/$_hookdomain/$_hookname.sh"