fix: Add requirements for install script
All checks were successful
Build Docker / Build_Docker (push) Successful in 35s

This commit is contained in:
2024-06-20 16:05:40 +10:00
parent de7dd7fe9a
commit 1fa923751d
2 changed files with 25 additions and 7 deletions

22
test.sh
View File

@@ -1,13 +1,23 @@
#!/bin/bash
# Get Node IPs
RESOLVED_IPS=$(dig +short hnsdoh.com)
NODE_IPS=($RESOLVED_IPS)
if [ ${#NODE_IPS[@]} -eq 0 ]; then
echo "No IP addresses resolved for hnsdoh.com. Exiting."
exit 1
# Check if script has ip address as argument
if [ -z "$1" ]; then
# Get Node IPs
RESOLVED_IPS=$(dig +short hnsdoh.com)
NODE_IPS=($RESOLVED_IPS)
if [ ${#NODE_IPS[@]} -eq 0 ]; then
echo "No IP addresses resolved for hnsdoh.com. Exiting."
exit 1
fi
fi
# If script has ip address as argument, use that
if [ -n "$1" ]; then
# Add all arguments to NODE_IPS array
NODE_IPS=("$@")
fi
# Define the domain and host for kdig commands
TLS_HOST="hnsdoh.com"