mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-17 11:28:23 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
811457e487 |
No files matched your search
@@ -584,28 +584,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-11-17
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- LibreNMS: write a valid APP_KEY before migrating [@MickLesk](https://github.com/MickLesk) ([#18776](https://github.com/community-scripts/ProxmoxVE/pull/18776))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Portabase: support file and folder backups (restic / rclone) [@MickLesk](https://github.com/MickLesk) ([#18766](https://github.com/community-scripts/ProxmoxVE/pull/18766))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Change Detection: replace Browserless with SockPuppetBrowser [@MickLesk](https://github.com/MickLesk) ([#18767](https://github.com/community-scripts/ProxmoxVE/pull/18767))
|
||||
|
||||
### 🧰 Tools
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Arcane: show the generated admin password [@MickLesk](https://github.com/MickLesk) ([#18785](https://github.com/community-scripts/ProxmoxVE/pull/18785))
|
||||
|
||||
## 2026-11-16
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
+38
-65
@@ -31,7 +31,7 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
ensure_dependencies libjpeg-dev poppler-utils file locales xvfb xauth python3
|
||||
ensure_dependencies libjpeg-dev poppler-utils file locales
|
||||
|
||||
msg_info "Generating Locales"
|
||||
for l in cs_CZ de_DE en_GB en_US es_ES fr_FR id_ID it_IT ja_JP ko_KR \
|
||||
@@ -44,83 +44,56 @@ function update_script() {
|
||||
fi
|
||||
msg_ok "Generated Locales"
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
VENV_PATH="/opt/changedetection/.venv"
|
||||
CHANGEDETECTION_BIN="${VENV_PATH}/bin/changedetection.io"
|
||||
SERVICE_FILE="/etc/systemd/system/changedetection.service"
|
||||
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
|
||||
msg_info "Updating ${APP}"
|
||||
[[ -x "$CHANGEDETECTION_BIN" ]] || $STD uv venv --clear "$VENV_PATH"
|
||||
$STD uv pip install --python "$VENV_PATH/bin/python" --upgrade changedetection.io playwright
|
||||
if ! grep -q "$CHANGEDETECTION_BIN" "$SERVICE_FILE"; then
|
||||
sed -i "s|^ExecStart=.*|ExecStart=$CHANGEDETECTION_BIN -d /opt/changedetection -p 5000|" "$SERVICE_FILE"
|
||||
fi
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
if [[ ! -f /etc/apt/sources.list.d/google-chrome.sources ]]; then
|
||||
msg_info "Installing Chrome"
|
||||
setup_deb822_repo \
|
||||
"google-chrome" \
|
||||
"https://dl.google.com/linux/linux_signing_key.pub" \
|
||||
"https://dl.google.com/linux/chrome/deb/" \
|
||||
"stable"
|
||||
$STD apt install -y google-chrome-stable
|
||||
rm -f /etc/apt/sources.list.d/google-chrome.list
|
||||
msg_ok "Installed Chrome"
|
||||
if [[ ! -d "$VENV_PATH" || ! -x "$CHANGEDETECTION_BIN" ]]; then
|
||||
msg_info "Migrating to uv/venv"
|
||||
rm -rf "$VENV_PATH"
|
||||
$STD uv venv --clear "$VENV_PATH"
|
||||
$STD "$VENV_PATH/bin/python" -m ensurepip --upgrade
|
||||
$STD "$VENV_PATH/bin/python" -m pip install --upgrade pip
|
||||
$STD "$VENV_PATH/bin/python" -m pip install changedetection.io playwright
|
||||
msg_ok "Migrated to uv/venv"
|
||||
else
|
||||
msg_info "Updating Chrome"
|
||||
apt_update_safe
|
||||
$STD apt install -y --only-upgrade google-chrome-stable
|
||||
msg_ok "Updated Chrome"
|
||||
msg_info "Updating ${APP}"
|
||||
$STD "$VENV_PATH/bin/python" -m pip install --upgrade changedetection.io playwright
|
||||
msg_ok "Updated ${APP}"
|
||||
fi
|
||||
|
||||
if check_for_gh_release "sockpuppetbrowser" "dgtlmoon/sockpuppetbrowser"; then
|
||||
[[ -f /etc/systemd/system/sockpuppetbrowser.service ]] && systemctl stop sockpuppetbrowser
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "sockpuppetbrowser" "dgtlmoon/sockpuppetbrowser" "tarball"
|
||||
|
||||
msg_info "Setting up SockPuppetBrowser"
|
||||
id -u chrome &>/dev/null || useradd -r -m -s /usr/sbin/nologin chrome
|
||||
$STD uv venv --clear --python /usr/bin/python3 /opt/sockpuppetbrowser/.venv
|
||||
$STD uv pip install --python /opt/sockpuppetbrowser/.venv/bin/python -r /opt/sockpuppetbrowser/requirements.txt
|
||||
msg_ok "Set up SockPuppetBrowser"
|
||||
SERVICE_FILE="/etc/systemd/system/changedetection.service"
|
||||
if ! grep -q "${VENV_PATH}/bin/changedetection.io" "$SERVICE_FILE"; then
|
||||
msg_info "Updating systemd service"
|
||||
sed -i "s|^ExecStart=.*|ExecStart=${VENV_PATH}/bin/changedetection.io -d /opt/changedetection -p 5000|" "$SERVICE_FILE"
|
||||
$STD systemctl daemon-reload
|
||||
msg_ok "Updated systemd service"
|
||||
fi
|
||||
|
||||
if [[ -f /etc/systemd/system/browserless.service ]]; then
|
||||
msg_info "Replacing Browserless with SockPuppetBrowser"
|
||||
systemctl disable -q --now browserless
|
||||
rm -f /etc/systemd/system/browserless.service
|
||||
rm -rf /opt/browserless /root/.cache/ms-playwright
|
||||
$STD apt purge -y microsoft-edge-stable
|
||||
rm -f /etc/apt/sources.list.d/microsoft-edge-stable.list
|
||||
cat <<EOF >/etc/systemd/system/sockpuppetbrowser.service
|
||||
[Unit]
|
||||
Description=SockPuppetBrowser
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=chrome
|
||||
Group=chrome
|
||||
WorkingDirectory=/opt/sockpuppetbrowser/backend
|
||||
Environment=CHROME_BIN=/usr/bin/google-chrome-stable
|
||||
Environment=LOG_LEVEL=INFO
|
||||
ExecStart=/opt/sockpuppetbrowser/.venv/bin/python server.py --host 127.0.0.1 --port 3000 --sport 8080
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
sed -i 's/browserless\.service/sockpuppetbrowser.service/g' "$SERVICE_FILE"
|
||||
sed -i -e '/^WEBDRIVER_URL=/d' \
|
||||
-e 's|^PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome.*|PLAYWRIGHT_DRIVER_URL=ws://127.0.0.1:3000/?headful=true\&--window-size=1920,1080|' \
|
||||
/opt/changedetection/.env
|
||||
systemctl daemon-reload
|
||||
systemctl enable -q sockpuppetbrowser
|
||||
msg_ok "Replaced Browserless with SockPuppetBrowser"
|
||||
msg_info "Updating Browserless (Patience)"
|
||||
$STD git -C /opt/browserless/ fetch --all
|
||||
$STD git -C /opt/browserless/ reset --hard origin/main
|
||||
$STD npm ci --include=optional --include=dev --prefix /opt/browserless
|
||||
$STD npm install --save-exact playwright-core@1.62.1 --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 --force msedge
|
||||
$STD /opt/browserless/node_modules/playwright-core/cli.js install chromium firefox webkit
|
||||
$STD npm install --prefix /opt/browserless esbuild typescript ts-node @types/node --save-dev
|
||||
$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 daemon-reload
|
||||
systemctl restart sockpuppetbrowser
|
||||
systemctl restart changedetection
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
|
||||
@@ -31,46 +31,6 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
TOOLS_CHANGED=false
|
||||
if check_for_gh_release "rclone" "rclone/rclone"; then
|
||||
TOOLS_CHANGED=true
|
||||
fetch_and_deploy_gh_release "rclone" "rclone/rclone" "binary" "latest" "" "rclone-v*-linux-$(arch_resolve).deb"
|
||||
fi
|
||||
if check_for_gh_release "restic" "restic/restic"; then
|
||||
TOOLS_CHANGED=true
|
||||
fetch_and_deploy_gh_release "restic" "restic/restic" "singlefile" "latest" "/usr/local/bin" "restic_*_linux_$(arch_resolve).bz2"
|
||||
fi
|
||||
if ! grep -q "/storage/restic/" /etc/nginx/sites-available/portabase; then
|
||||
msg_info "Adding file backup routes to Nginx"
|
||||
cat <<'EOF' >/tmp/portabase-storage.conf
|
||||
location /storage/restic/ {
|
||||
proxy_pass http://127.0.0.1:1081;
|
||||
proxy_request_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location /storage/sync/ {
|
||||
proxy_pass http://127.0.0.1:1082;
|
||||
proxy_request_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
EOF
|
||||
sed -i '/ignore_invalid_headers off;/r /tmp/portabase-storage.conf' /etc/nginx/sites-available/portabase
|
||||
rm -f /tmp/portabase-storage.conf
|
||||
$STD nginx -t
|
||||
systemctl reload nginx
|
||||
msg_ok "Added file backup routes to Nginx"
|
||||
fi
|
||||
if [[ "$TOOLS_CHANGED" == "true" ]]; then
|
||||
systemctl restart portabase
|
||||
fi
|
||||
|
||||
if check_for_gh_release "portabase" "Portabase/portabase"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop portabase portabase-tusd
|
||||
|
||||
@@ -13,13 +13,32 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
msg_info "Installing Dependencies (Patience)"
|
||||
$STD apt install -y \
|
||||
git \
|
||||
build-essential \
|
||||
dumb-init \
|
||||
libjpeg-dev \
|
||||
libatk-bridge2.0-0 \
|
||||
libasound2 \
|
||||
libatk1.0-0 \
|
||||
libcairo2 \
|
||||
libcups2 \
|
||||
libdbus-1-3 \
|
||||
libexpat1 \
|
||||
libgbm-dev \
|
||||
libgbm1 \
|
||||
libgdk-pixbuf-2.0-0 \
|
||||
libglib2.0-0 \
|
||||
libgtk-3-0 \
|
||||
libnspr4 \
|
||||
libnss3 \
|
||||
libpango-1.0-0 \
|
||||
libpangocairo-1.0-0 \
|
||||
qpdf \
|
||||
xdg-utils \
|
||||
xvfb \
|
||||
xauth \
|
||||
python3 \
|
||||
ca-certificates \
|
||||
locales \
|
||||
poppler-utils \
|
||||
file
|
||||
@@ -35,25 +54,35 @@ msg_ok "Generated Locales"
|
||||
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Installing Change Detection"
|
||||
mkdir -p /opt/changedetection
|
||||
$STD uv venv --clear /opt/changedetection/.venv
|
||||
$STD uv pip install --python /opt/changedetection/.venv/bin/python changedetection.io playwright
|
||||
$STD /opt/changedetection/.venv/bin/python -m ensurepip --upgrade
|
||||
$STD /opt/changedetection/.venv/bin/python -m pip install --upgrade pip
|
||||
$STD /opt/changedetection/.venv/bin/python -m pip install changedetection.io
|
||||
cat <<EOF >/opt/changedetection/.env
|
||||
PLAYWRIGHT_DRIVER_URL=ws://127.0.0.1:3000/?headful=true&--window-size=1920,1080
|
||||
WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub
|
||||
PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome?launch=eyJkZWZhdWx0Vmlld3BvcnQiOnsiaGVpZ2h0Ijo3MjAsIndpZHRoIjoxMjgwfSwiaGVhZGxlc3MiOmZhbHNlLCJzdGVhbHRoIjp0cnVlfQ==&blockAds=true
|
||||
LC_ALL=en_US.UTF-8
|
||||
EOF
|
||||
msg_ok "Installed Change Detection"
|
||||
|
||||
msg_info "Installing Chrome"
|
||||
setup_deb822_repo \
|
||||
"google-chrome" \
|
||||
"https://dl.google.com/linux/linux_signing_key.pub" \
|
||||
"https://dl.google.com/linux/chrome/deb/" \
|
||||
"stable"
|
||||
$STD apt install -y google-chrome-stable
|
||||
rm -f /etc/apt/sources.list.d/google-chrome.list
|
||||
msg_ok "Installed Chrome"
|
||||
msg_info "Installing Browserless & Playwright"
|
||||
mkdir /opt/browserless
|
||||
$STD /opt/changedetection/.venv/bin/python -m pip install playwright
|
||||
$STD git clone https://github.com/browserless/chrome /opt/browserless
|
||||
$STD npm ci --include=optional --include=dev --prefix /opt/browserless
|
||||
$STD npm install --save-exact playwright-core@1.62.1 --prefix /opt/browserless
|
||||
$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps &>/dev/null
|
||||
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force chrome &>/dev/null
|
||||
$STD /opt/browserless/node_modules/playwright-core/cli.js install chromium firefox webkit &>/dev/null
|
||||
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force msedge
|
||||
$STD npm run build --prefix /opt/browserless
|
||||
$STD npm run build:function --prefix /opt/browserless
|
||||
$STD npm prune production --prefix /opt/browserless
|
||||
msg_ok "Installed Browserless & Playwright"
|
||||
|
||||
msg_info "Installing Font Packages"
|
||||
$STD apt install -y \
|
||||
@@ -70,38 +99,30 @@ $STD apt install -y \
|
||||
fonts-wqy-zenhei
|
||||
msg_ok "Installed Font Packages"
|
||||
|
||||
fetch_and_deploy_gh_release "sockpuppetbrowser" "dgtlmoon/sockpuppetbrowser" "tarball"
|
||||
|
||||
msg_info "Setting up SockPuppetBrowser"
|
||||
useradd -r -m -s /usr/sbin/nologin chrome
|
||||
$STD uv venv --clear --python /usr/bin/python3 /opt/sockpuppetbrowser/.venv
|
||||
$STD uv pip install --python /opt/sockpuppetbrowser/.venv/bin/python -r /opt/sockpuppetbrowser/requirements.txt
|
||||
msg_ok "Set up SockPuppetBrowser"
|
||||
msg_info "Installing X11 Packages"
|
||||
$STD apt install -y \
|
||||
libx11-6 \
|
||||
libx11-xcb1 \
|
||||
libxcb1 \
|
||||
libxcomposite1 \
|
||||
libxcursor1 \
|
||||
libxdamage1 \
|
||||
libxext6 \
|
||||
libxfixes3 \
|
||||
libxi6 \
|
||||
libxrandr2 \
|
||||
libxrender1 \
|
||||
libxss1 \
|
||||
libxtst6
|
||||
msg_ok "Installed X11 Packages"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/sockpuppetbrowser.service
|
||||
[Unit]
|
||||
Description=SockPuppetBrowser
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=chrome
|
||||
Group=chrome
|
||||
WorkingDirectory=/opt/sockpuppetbrowser/backend
|
||||
Environment=CHROME_BIN=/usr/bin/google-chrome-stable
|
||||
Environment=LOG_LEVEL=INFO
|
||||
ExecStart=/opt/sockpuppetbrowser/.venv/bin/python server.py --host 127.0.0.1 --port 3000 --sport 8080
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/changedetection.service
|
||||
[Unit]
|
||||
Description=Change Detection
|
||||
After=network-online.target sockpuppetbrowser.service
|
||||
Wants=sockpuppetbrowser.service
|
||||
After=network-online.target
|
||||
After=network.target browserless.service
|
||||
Wants=browserless.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
@@ -112,7 +133,23 @@ ExecStart=/opt/changedetection/.venv/bin/changedetection.io -d /opt/changedetect
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now sockpuppetbrowser changedetection
|
||||
|
||||
cat <<EOF >/etc/systemd/system/browserless.service
|
||||
[Unit]
|
||||
Description=browserless service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Environment=CONNECTION_TIMEOUT=60000
|
||||
WorkingDirectory=/opt/browserless
|
||||
ExecStart=/opt/browserless/scripts/start.sh
|
||||
SyslogIdentifier=browserless
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
EOF
|
||||
systemctl enable -q --now browserless
|
||||
systemctl enable -q --now changedetection
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
|
||||
@@ -52,7 +52,7 @@ msg_info "Configuring LibreNMS"
|
||||
$STD useradd librenms -d /opt/librenms -M -r -s "$(which bash)"
|
||||
mkdir -p /opt/librenms/{rrd,logs,bootstrap/cache,storage,html}
|
||||
cd /opt/librenms
|
||||
APP_KEY="base64:$(openssl rand -base64 32)"
|
||||
APP_KEY=$(openssl rand -base64 40 | tr -dc 'a-zA-Z0-9')
|
||||
$STD uv venv --clear .venv
|
||||
$STD source .venv/bin/activate
|
||||
$STD uv pip install -r requirements.txt
|
||||
@@ -124,6 +124,7 @@ EOF
|
||||
|
||||
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev"
|
||||
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && php8.4 artisan migrate --force"
|
||||
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && php8.4 artisan key:generate --force"
|
||||
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && lnms db:seed --force"
|
||||
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && lnms user:add -p ${APP_PASSWORD} ${APP_USER} --role=admin"
|
||||
|
||||
|
||||
@@ -26,8 +26,6 @@ PG_DB_NAME="portabase" PG_DB_USER="portabase" setup_postgresql_db
|
||||
|
||||
fetch_and_deploy_gh_release "portabase" "Portabase/portabase" "tarball"
|
||||
fetch_and_deploy_gh_release "tusd" "tus/tusd" "prebuild" "latest" "/opt/tusd" "tusd_linux_$(arch_resolve).tar.gz"
|
||||
fetch_and_deploy_gh_release "rclone" "rclone/rclone" "binary" "latest" "" "rclone-v*-linux-$(arch_resolve).deb"
|
||||
fetch_and_deploy_gh_release "restic" "restic/restic" "singlefile" "latest" "/usr/local/bin" "restic_*_linux_$(arch_resolve).bz2"
|
||||
|
||||
msg_info "Configuring Portabase"
|
||||
mkdir -p /opt/portabase-data/uploads/tmp
|
||||
@@ -143,24 +141,6 @@ server {
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
location /storage/restic/ {
|
||||
proxy_pass http://127.0.0.1:1081;
|
||||
proxy_request_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location /storage/sync/ {
|
||||
proxy_pass http://127.0.0.1:1082;
|
||||
proxy_request_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location = /api/tus/hooks {
|
||||
deny all;
|
||||
return 404;
|
||||
|
||||
Reference in new issue
Block a user