diff --git a/install.sh b/install.sh index bc60e7c..3547cce 100644 --- a/install.sh +++ b/install.sh @@ -4,7 +4,13 @@ cd ~ # Install the required packages sudo apt update -y -sudo apt install -y git curl wget nodejs npm +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 diff --git a/remote-relay.service b/remote-relay.service index f3b0c39..5c01afa 100644 --- a/remote-relay.service +++ b/remote-relay.service @@ -4,7 +4,7 @@ After=multi-user.target [Service] WorkingDirectory=/home/pi/remote-relay -ExecStart=node /home/pi/remote-relay/index.js +ExecStart=/home/pi/.nvm/versions/node/v22.12.0/bin/node /home/pi/remote-relay/index.js User=1000 Group=1000 Restart=always