Skip to content

Commit ae907f0

Browse files
committed
ucame: modify dns api config file locations
moved location of dns api config file for less clutter on main acme state dir Signed-off-by: Seo Suchan <tjtncks@gmail.com>
1 parent 33db828 commit ae907f0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

net/uacme/files/dnschalhook.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,18 @@ 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_DIR=$UACME_CONFDIR/$IDENT
47+
DOMAIN_CONF=$DOMAIN_CONF_DIR/dnsapi.conf
4748
ACMESH_DNSSCIRPT_DIR=${ACMESH_DNSSCIRPT_DIR:-/usr/lib/acme/client/dnsapi}
4849

4950
#import dns hook script
51+
dns=${dns:-$(head -n 1 $DOMAIN_CONF_DIR/selected_api)} # use different file to not hurt acme.sh config file struct
5052
if [ ! -f "$ACMESH_DNSSCIRPT_DIR/$dns.sh" ]; then
51-
echo "dns file $dns doesn't exit" > tee /tmp/dnshooklog
53+
echo "dns file $dns doesn't exit" 1>&2
5254
exit 1
5355
fi
5456
. /usr/lib/acme/client/dnsapi/$dns.sh
57+
echo $dns > "$DOMAIN_CONF_DIR/selected_api"
5558
case "$METHOD" in
5659
"begin")
5760
(umask 077 ; touch -a "$DOMAIN_CONF")

0 commit comments

Comments
 (0)