fix: Add requirements for install script
All checks were successful
Build Docker / Build_Docker (push) Successful in 35s
All checks were successful
Build Docker / Build_Docker (push) Successful in 35s
This commit is contained in:
parent
de7dd7fe9a
commit
1fa923751d
10
install.sh
10
install.sh
@ -6,10 +6,17 @@ if [ "$EUID" -ne 0 ]
|
||||
exit
|
||||
fi
|
||||
|
||||
# Make sure working directory is /root
|
||||
if [ "$PWD" != "/root" ]
|
||||
then echo "Please run this script from /root directory."
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
chmod +x cert.sh cert.py
|
||||
sudo apt-get install -y dnsdist
|
||||
# Install certbot
|
||||
sudo apt install snapd
|
||||
sudo apt install snapd -y
|
||||
sudo snap install --classic certbot
|
||||
sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
||||
sudo certbot certonly --manual --manual-auth-hook ./cert.py --preferred-challenges dns -d hnsdoh.com --deploy-hook ./cert.sh
|
||||
@ -46,6 +53,7 @@ export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || pr
|
||||
cd /root # Double check this path
|
||||
|
||||
# Install Node.js
|
||||
sudo apt install build-essential -y
|
||||
nvm install 20.14.0
|
||||
npm install -g node-gyp
|
||||
|
||||
|
10
test.sh
10
test.sh
@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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)
|
||||
@ -7,6 +9,14 @@ 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
|
||||
|
Loading…
Reference in New Issue
Block a user