From 49662ddd3dc6d89504484a0b59b4a7ef20ff219b Mon Sep 17 00:00:00 2001
From: tteckster <tteckster@gmail.com>
Date: Fri, 1 Sep 2023 06:44:41 -0400
Subject: [PATCH] Update changedetection-install.sh

new nodejs install method
fixes https://github.com/tteck/Proxmox/issues/1748
---
 install/changedetection-install.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh
index 7bae8084..1ff0af91 100644
--- a/install/changedetection-install.sh
+++ b/install/changedetection-install.sh
@@ -41,7 +41,9 @@ $STD apt-get install -y \
   libpangocairo-1.0-0 \
   qpdf \
   xdg-utils \
-  xvfb
+  xvfb \
+  ca-certificates \
+  gnupg
 msg_ok "Installed Dependencies"
 
 msg_info "Updating Python3"
@@ -52,10 +54,12 @@ $STD apt-get install -y \
 msg_ok "Updated Python3"
 
 msg_info "Setting up Node.js Repository"
-$STD bash <(curl -fsSL https://deb.nodesource.com/setup_18.x)
+curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
+echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
 msg_ok "Set up Node.js Repository"
 
 msg_info "Installing Node.js"
+$STD apt-get update
 $STD apt-get install -y nodejs
 msg_ok "Installed Node.js"