From 9cc1e1b6411cc6d4e912fdbad59fb52814935fbe Mon Sep 17 00:00:00 2001 From: Jacob Berelman <630000+stickpin@users.noreply.github.com> Date: Sun, 20 Oct 2024 19:38:57 +0200 Subject: [PATCH] Change Detection update script enhancements --- ct/changedetection.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ct/changedetection.sh b/ct/changedetection.sh index b6f42369..d79b6987 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/browserless1.service ]]; then + git -C /opt/browserless/ pull + npm update --prefix /opt/browserless + npm run build --prefix /opt/browserless + npm run build:function --prefix /opt/browserless + npm prune production --prefix /opt/browserless + systemctl restart browserless +else + msg_error "No Browserless Installation Found!" +fi systemctl restart changedetection msg_ok "Updated Successfully" exit