Skip to content

Commit 09eb69d

Browse files
committed
modify dns api config file locations to less clutter on main acme state dir
Signed-off-by: Seo Suchan <tjtncks@gmail.com>
1 parent 33db828 commit 09eb69d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

net/uacme/files/dnschalhook.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,17 @@ fi
4343
. /usr/lib/acme/functions.sh
4444
. /usr/lib/acme/client/dnsapi_helper.sh
4545
ACCOUNT_CONF_PATH=$UACME_CONFDIR/accounts.conf
46-
DOMAIN_CONF=$UACME_CONFDIR/$IDENT.conf
46+
DOMAIN_CONF=$UACME_CONFDIR/$IDENT/dnsapi.conf
4747
ACMESH_DNSSCIRPT_DIR=${ACMESH_DNSSCIRPT_DIR:-/usr/lib/acme/client/dnsapi}
4848

4949
#import dns hook script
50+
dns=${dns:-$(head -n 1 $DOMAIN_CONF.apiselect)} # use different file to not hurt acme.sh config file struct
5051
if [ ! -f "$ACMESH_DNSSCIRPT_DIR/$dns.sh" ]; then
51-
echo "dns file $dns doesn't exit" > tee /tmp/dnshooklog
52+
echo "dns file $dns doesn't exit" 1>&2
5253
exit 1
5354
fi
5455
. /usr/lib/acme/client/dnsapi/$dns.sh
56+
echo $dns > "$DOMAIN_CONF.apiselect"
5557
case "$METHOD" in
5658
"begin")
5759
(umask 077 ; touch -a "$DOMAIN_CONF")

0 commit comments

Comments
 (0)