🗃️ Update codebase 🗃️

rootfs/usr/local/bin/entrypoint.sh
rootfs/usr/local/bin/get_dns_record
This commit is contained in:
casjay
2025-11-30 15:16:44 -05:00
parent 0eba6accc6
commit 52cfd14af6
2 changed files with 279 additions and 278 deletions

View File

@@ -1,13 +1,13 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck shell=bash # shellcheck shell=bash
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202511291229-git ##@Version : 202511301511-git
# @@Author : Jason Hempstead # @@Author : Jason Hempstead
# @@Contact : jason@casjaysdev.pro # @@Contact : jason@casjaysdev.pro
# @@License : WTFPL # @@License : WTFPL
# @@ReadME : entrypoint.sh --help # @@ReadME : entrypoint.sh --help
# @@Copyright : Copyright: (c) 2025 Jason Hempstead, Casjays Developments # @@Copyright : Copyright: (c) 2025 Jason Hempstead, Casjays Developments
# @@Created : Saturday, Nov 29, 2025 12:29 EST # @@Created : Sunday, Nov 30, 2025 15:11 EST
# @@File : entrypoint.sh # @@File : entrypoint.sh
# @@Description : Entrypoint file for bind # @@Description : Entrypoint file for bind
# @@Changelog : New script # @@Changelog : New script
@@ -95,7 +95,7 @@ WEB_SERVER_PORT="" # port : 80,443
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Healthcheck variables # Healthcheck variables
HEALTH_ENABLED="yes" # enable healthcheck [yes/no] HEALTH_ENABLED="yes" # enable healthcheck [yes/no]
SERVICES_LIST="tini" # comma separated list of processes for the healthcheck SERVICES_LIST="tini,tor,named,php-fpm,nginx" # comma separated list of processes for the healthcheck
HEALTH_ENDPOINTS="" # url endpoints: [http://localhost/health,http://localhost/test] HEALTH_ENDPOINTS="" # url endpoints: [http://localhost/health,http://localhost/test]
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Update path var # Update path var

View File

@@ -45,10 +45,11 @@ __function_exists() { builtin type $1 >/dev/null 2>&1 || return 1; }
DEFAULT_COLOR="254" DEFAULT_COLOR="254"
GET_DNS_RECORD_EXIT_STATUS=0 GET_DNS_RECORD_EXIT_STATUS=0
GET_DNS_RECORD_DOMAIN_NAME="$1" GET_DNS_RECORD_DOMAIN_NAME="$1"
[ -n "$2" ] && GET_DNS_RECORD_TYPE=" $2 " || GET_DNS_RECORD_TYPE=" A "
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Main application # Main application
[ -n "$GET_DNS_RECORD_DOMAIN_NAME" ] || exit 2 [ -n "$GET_DNS_RECORD_DOMAIN_NAME" ] || exit 2
grep '^@' "/data/bind/zones/$GET_DNS_RECORD_DOMAIN_NAME.zone" | grep 'IN' | grep ' A ' | sed 's|.*A||g;s|;.*||g;s/^[ \t]*//' || exit 2 grep '^@' "/data/bind/zones/$GET_DNS_RECORD_DOMAIN_NAME.zone" | grep 'IN' | grep "$GET_DNS_RECORD_TYPE" | sed 's|.*A||g;s|;.*||g;s/^[ \t]*//' || exit 2
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# End application # End application
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -