From b387b6727475136440ca35c6159452faf9911de9 Mon Sep 17 00:00:00 2001 From: casjay Date: Tue, 27 Aug 2024 14:29:22 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rootfs/usr/local/etc/docker/init.d/00-named.sh --- rootfs/usr/local/etc/docker/init.d/00-named.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rootfs/usr/local/etc/docker/init.d/00-named.sh b/rootfs/usr/local/etc/docker/init.d/00-named.sh index 415ad62..3433141 100755 --- a/rootfs/usr/local/etc/docker/init.d/00-named.sh +++ b/rootfs/usr/local/etc/docker/init.d/00-named.sh @@ -62,7 +62,7 @@ __rndc_key() { grep -s 'key "rndc-key" ' /etc/named.conf | grep -v 'KEY_RNDC' | __dhcp_key() { grep -s 'key "dhcp-key" ' /etc/named.conf | grep -v 'KEY_DHCP' | sed 's|.*secret ||g;s|"||g;s|;.*||g' | grep '^' || return 1; } __certbot_key() { grep -s 'key "certbot" ' /etc/named.conf | grep -v 'KEY_CERTBOT' | sed 's|.*secret ||g;s|"||g;s|;.*||g' | grep '^' || return 1; } __backup_key() { grep -s 'key "backup-key" ' /etc/named.conf | grep -v 'KEY_BACKUP' | sed 's|.*secret ||g;s|"||g;s|;.*||g' | grep '^' || return 1; } -__tsig_key() { tsig-keygen -a hmac-sha256 | grep 'secret' | sed 's|.*secret "||g;s|"||g;s|;||g' | grep '^' || echo 'wp/HApbthaVPjwqgp6ziLlmnkyLSNbRTehkdARBDcpI='; } +__tsig_key() { tsig-keygen -a hmac-${1:-sha256} | grep 'secret' | sed 's|.*secret "||g;s|"||g;s|;||g' | grep '^' || echo 'wp/HApbthaVPjwqgp6ziLlmnkyLSNbRTehkdARBDcpI='; } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Script to execute START_SCRIPT="/usr/local/etc/docker/exec/$SERVICE_NAME" @@ -158,10 +158,10 @@ user_pass="${NAMED_USER_PASS_WORD:-}" # normal user password # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Additional predefined variables DNS_SERIAL="$(date +'%Y%m%d%S')" -KEY_RNDC="${KEY_RNDC:-$(__rndc_key || __tsig_key)}" -KEY_DHCP="${KEY_DHCP:-$(__dhcp_key || __tsig_key)}" -KEY_BACKUP="${KEY_BACKUP:-$(__backup_key || __tsig_key)}" -KEY_CERTBOT="${KEY_CERTBOT:-$(__certbot_key || __tsig_key)}" +KEY_DHCP="${KEY_DHCP:-$(__dhcp_key || __tsig_key md5)}" +KEY_RNDC="${KEY_RNDC:-$(__rndc_key || __tsig_key sha256)}" +KEY_BACKUP="${KEY_BACKUP:-$(__backup_key || __tsig_key sha256)}" +KEY_CERTBOT="${KEY_CERTBOT:-$(__certbot_key || __tsig_key sha512)}" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Additional variables DNS_TYPE="${DNS_TYPE:-primary}"