From 9a0cb6b8f5a379a0f4ecbcad8c2e77fc36709e2f Mon Sep 17 00:00:00 2001 From: Jacob <630000+stickpin@users.noreply.github.com> Date: Sun, 20 Oct 2024 20:02:09 +0200 Subject: [PATCH] Changedetection update enhancements (#3933) --- ct/changedetection.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ct/changedetection.sh b/ct/changedetection.sh index b6f42369..85067c6b 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -62,6 +62,16 @@ if ! dpkg -s libjpeg-dev >/dev/null 2>&1; then fi pip3 install changedetection.io --upgrade &>/dev/null pip3 install playwright --upgrade &>/dev/null +if [[ -f /etc/systemd/system/browserless.service ]]; then + git -C /opt/browserless/ pull &>/dev/null + npm update --prefix /opt/browserless &>/dev/null + npm run build --prefix /opt/browserless &>/dev/null + npm run build:function --prefix /opt/browserless &>/dev/null + npm prune production --prefix /opt/browserless &>/dev/null + systemctl restart browserless +else + msg_error "No Browserless Installation Found!" +fi systemctl restart changedetection msg_ok "Updated Successfully" exit