1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-04-16 15:51:55 +00:00
ProxmoxVE/ct/changedetection.sh
CanbiZ 8c051b8186
Replace wget with curl -fsSL, normalize downloads, and prep for IPv6 (#3455)
* Initial Call, Switch from curl -s to curl -fsSL and wget to curl -fssL

* more switches

* switch vms

* more curls

* More curls

* more

* more

* more changes

* more

* prepare ipv6 calls

* change frontend to ipv6

* Formatting

* Fromatting

* Update gomft.sh

* Update gomft-install.sh

* Update ersatztv.sh

* Update build.func

---------

Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
2025-04-01 10:25:46 +02:00

77 lines
2.4 KiB
Bash

#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 tteck
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://changedetection.io/
APP="Change Detection"
var_tags="monitoring;crawler"
var_cpu="2"
var_ram="2048"
var_disk="10"
var_os="debian"
var_version="12"
var_unprivileged="1"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/systemd/system/changedetection.service ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if ! dpkg -s libjpeg-dev >/dev/null 2>&1; then
msg_info "Installing Dependencies"
$STD apt-get update
$STD apt-get install -y libjpeg-dev
msg_ok "Updated Dependencies"
fi
msg_info "Updating ${APP}"
$STD pip3 install changedetection.io --upgrade
msg_ok "Updated ${APP}"
msg_info "Updating Playwright"
$STD pip3 install playwright --upgrade
msg_ok "Updated Playwright"
if [[ -f /etc/systemd/system/browserless.service ]]; then
msg_info "Updating Browserless (Patience)"
$STD git -C /opt/browserless/ fetch --all
$STD git -C /opt/browserless/ reset --hard origin/main
$STD npm update --prefix /opt/browserless
$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps
# Update Chrome separately, as it has to be done with the force option. Otherwise the installation of other browsers will not be done if Chrome is already installed.
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force chrome
$STD /opt/browserless/node_modules/playwright-core/cli.js install chromium firefox webkit
$STD npm run build --prefix /opt/browserless
$STD npm run build:function --prefix /opt/browserless
$STD npm prune production --prefix /opt/browserless
systemctl restart browserless
msg_ok "Updated Browserless"
else
msg_error "No Browserless Installation Found!"
fi
systemctl restart changedetection
msg_ok "Updated Successfully"
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5000${CL}"