#!/bin/bash cd ~ # Install the required packages sudo apt update -y sudo apt install -y git curl wget # Install Node.js curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash source ~/.bashrc nvm install 22.12.0 nvm use 22.12.0 git clone https://git.bpfilip.dk/fbp/remote-relay.git sudo chown -R pi:pi ~/remote-relay pushd ~/remote-relay git pull npm install sudo cp auto-ssh-systemd-hosts.conf /etc/ssh/ssh_config.d/auto-ssh-systemd-hosts.conf sudo cp remote-relay.service /etc/systemd/system/remote-relay.service sudo cp autossh.service /etc/systemd/system/autossh.service sudo systemctl daemon-reload sudo systemctl enable remote-relay.service sudo systemctl restart remote-relay.service sudo systemctl enable autossh.service sudo systemctl restart autossh.service popd