fix: Update paths in the install script
Some checks failed
Build Docker / Build_Docker (push) Has been cancelled

This commit is contained in:
Nathan Woodburn 2024-10-04 18:04:54 +10:00
parent 004e7fcd9f
commit 44a2b61fce
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -13,19 +13,20 @@ if [ "$PWD" != "/root" ]
fi fi
chmod +x cert.sh cert.py chmod +x /root/hns_doh_loadbalancer/cert.py
chmod +x /root/hns_doh_loadbalancer/cert.sh
sudo apt-get install -y dnsdist sudo apt-get install -y dnsdist
# Install certbot # Install certbot
sudo apt install snapd -y sudo apt install snapd -y
sudo snap install --classic certbot sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot certonly --manual --manual-auth-hook /root/hns_doh_loadbalancer/cert.py --preferred-challenges dns -d hnsdoh.com --deploy-hook /root/hns_doh_loadbalancer/cert.sh sudo certbot certonly --manual --manual-auth-hook /root/hns_doh_loadbalancer/cert.py --preferred-challenges dns -d hnsdoh.com --deploy-hook /root/hns_doh_loadbalancer/cert.sh
sudo cp ./resolved.conf /etc/systemd/resolved.conf sudo cp /root/hns_doh_loadbalancer/resolved.conf /etc/systemd/resolved.conf
sudo systemctl restart systemd-resolved sudo systemctl restart systemd-resolved
# Move the conf file to the correct location # Move the conf file to the correct location
sudo cp ./dnsdist.conf /etc/dnsdist/dnsdist.conf sudo cp /root/hns_doh_loadbalancer/dnsdist.conf /etc/dnsdist/dnsdist.conf
sudo cp ./dnsdist.service /lib/systemd/system/dnsdist.service sudo cp /root/hns_doh_loadbalancer/dnsdist.service /lib/systemd/system/dnsdist.service
sudo systemctl daemon-reload sudo systemctl daemon-reload
# Restart dnsdist # Restart dnsdist
@ -39,7 +40,7 @@ sudo apt update
sudo apt install caddy -y sudo apt install caddy -y
# Move the Caddyfile to the correct location # Move the Caddyfile to the correct location
sudo cp ./Caddyfile /etc/caddy/Caddyfile sudo cp /root/hns_doh_loadbalancer/Caddyfile /etc/caddy/Caddyfile
# Restart caddy # Restart caddy
sudo systemctl restart caddy sudo systemctl restart caddy
@ -50,8 +51,6 @@ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
cd /root # Double check this path
# Install unbound # Install unbound
sudo apt install libunbound-dev -y sudo apt install libunbound-dev -y
@ -65,7 +64,7 @@ git clone --depth 1 --branch latest https://github.com/handshake-org/hsd.git
cd hsd cd hsd
npm install --omit=dev npm install --omit=dev
sudo cp ./hsd.service /lib/systemd/system/hsd.service sudo cp /root/hns_doh_loadbalancer/hsd.service /lib/systemd/system/hsd.service
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl enable hsd sudo systemctl enable hsd
sudo systemctl start hsd sudo systemctl start hsd