Compare commits

..
Author SHA1 Message Date
MickLesk c7159fc9f7 Use apt_update_safe instead of aborting on a failed apt update 2026-09-23 16:27:12 +02:00
10 changed files with 97 additions and 133 deletions
+1 -24
View File
@@ -546,40 +546,17 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-09-24
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- general: use apt_update_safe instead of aborting on a failed apt update [@MickLesk](https://github.com/MickLesk) ([#17462](https://github.com/community-scripts/ProxmoxVE/pull/17462))
### 💾 Core
- core: accept an off-subnet gateway for /31 and /32 [@MickLesk](https://github.com/MickLesk) ([core#70](https://github.com/community-scripts/core/pull/70))
## 2026-09-23
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- fix(signoz): install the histogramQuantile ClickHouse function [@maksimtech](https://github.com/maksimtech) ([#17386](https://github.com/community-scripts/ProxmoxVE/pull/17386))
- omniroute: bump to 4 GB for the npm install [@MickLesk](https://github.com/MickLesk) ([#17461](https://github.com/community-scripts/ProxmoxVE/pull/17461))
- Run Borg-UI with a single gunicorn worker [@MickLesk](https://github.com/MickLesk) ([#17445](https://github.com/community-scripts/ProxmoxVE/pull/17445))
- immich: keep geodata linked and the build deps present on update [@MickLesk](https://github.com/MickLesk) ([#17438](https://github.com/community-scripts/ProxmoxVE/pull/17438))
- #### 🔧 Refactor
- Refactor: Scanopy [@MickLesk](https://github.com/MickLesk) ([#16797](https://github.com/community-scripts/ProxmoxVE/pull/16797))
### 💾 Core
- stop a partial find from aborting the caller under pipefail [@MickLesk](https://github.com/MickLesk) ([core#68](https://github.com/community-scripts/core/pull/68))
- core: give RHEL-family containers an ostype PVE accepts [@MickLesk](https://github.com/MickLesk) ([core#67](https://github.com/community-scripts/core/pull/67))
- core: do not abort on a failed apt update [@MickLesk](https://github.com/MickLesk) ([core#66](https://github.com/community-scripts/core/pull/66))
- VM's: report a finished VM as done, not aborted [@MickLesk](https://github.com/MickLesk) ([core#65](https://github.com/community-scripts/core/pull/65))
- VM-Core: decide console autologin from the image, not USE_CLOUD_INIT [@MickLesk](https://github.com/MickLesk) ([core#63](https://github.com/community-scripts/core/pull/63))
- VM-Core: decide console autologin from the image, not USE_CLOUD_INIT [@MickLesk](https://github.com/MickLesk) ([core#63](https://github.com/community-scripts/core/pull/63))
- VM-Core: report failed image steps and restore tty1 autologin without cloud-init [@MickLesk](https://github.com/MickLesk) ([core#62](https://github.com/community-scripts/core/pull/62))
- tools: raise pnpm/yarn fetch timeout and lower network concurrency [@MickLesk](https://github.com/MickLesk) ([core#59](https://github.com/community-scripts/core/pull/59))
- VM-Core: stop discarding cloud-init error messages [@MickLesk](https://github.com/MickLesk) ([core#60](https://github.com/community-scripts/core/pull/60))
-8
View File
@@ -32,14 +32,6 @@ function update_script() {
exit
fi
if grep -q -- '--workers 2' /etc/systemd/system/borg-ui.service 2>/dev/null; then
msg_info "Reducing Service to a single worker"
sed -i 's/--workers 2/--workers 1/' /etc/systemd/system/borg-ui.service
systemctl daemon-reload
systemctl try-restart borg-ui
msg_ok "Reduced Service to a single worker"
fi
if check_for_gh_release "borg-ui" "karanhudia/borg-ui"; then
msg_info "Stopping Service"
systemctl stop borg-ui
+1 -1
View File
@@ -36,7 +36,7 @@ function update_script() {
msg_warn "⚠️ ${APP} has been migrated to an addon script."
echo ""
msg_custom "️" "${YW}" "This is a one-time migration. After this, you can update ${APP} anytime with:"
msg_info "This is a one-time migration. After this, you can update ${APP} anytime with:"
echo -e "${TAB}${TAB}${GN}update_komodo${CL} or ${GN}bash <(curl -fsSL ${ADDON_SCRIPT})${CL}"
echo ""
read -r -p "${TAB}Migrate update function now? [y/N]: " CONFIRM
+1 -1
View File
@@ -10,7 +10,7 @@ source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_
APP="OmniRoute"
var_tags="${var_tags:-ai;gateway;llm}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-4096}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-10}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
+24 -29
View File
@@ -38,20 +38,35 @@ function update_script() {
[[ -f /etc/systemd/system/scanopy-daemon.service ]] && systemctl stop scanopy-daemon
msg_ok "Stopped services"
cp -f /usr/bin/scanopy-server /usr/bin/scanopy-server.bak 2>/dev/null || true
cp -f /opt/scanopy/.env /opt/scanopy/.env.bak
cp -f /etc/systemd/system/scanopy-server.service /etc/systemd/system/scanopy-server.service.bak
create_backup /opt/scanopy/.env /opt/scanopy/oidc.toml
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Scanopy" "scanopy/scanopy" "tarball" "latest" "/opt/scanopy"
restore_backup
ensure_dependencies pkg-config libssl-dev
TOOLCHAIN="$(grep "channel" /opt/scanopy/backend/rust-toolchain.toml | awk -F\" '{print $2}')"
RUST_TOOLCHAIN=$TOOLCHAIN setup_rust
if ! grep -q "PUBLIC_URL" /opt/scanopy/.env; then
sed -i "\|_PATH=|a\\SCANOPY_PUBLIC_URL=http://${LOCAL_IP}:60072" /opt/scanopy/.env
sed -i "\|_PATH=|a\\scanopy_PUBLIC_URL=http://${LOCAL_IP}:60072" /opt/scanopy/.env
fi
sed -i 's|_TARGET=.*$|_URL=http://127.0.0.1:60072|' /opt/scanopy/.env
sed -i '/^SCANOPY_WEB_EXTERNAL_PATH=/d' /opt/scanopy/.env
sed -i 's|^WorkingDirectory=/opt/scanopy/backend$|WorkingDirectory=/opt/scanopy|' /etc/systemd/system/scanopy-server.service
systemctl daemon-reload
fetch_and_deploy_gh_release "Scanopy" "scanopy/scanopy" "singlefile" "latest" "/usr/bin" "scanopy-server-linux-$(arch_resolve)"
mv -f /usr/bin/Scanopy /usr/bin/scanopy-server
msg_info "Building Scanopy Server (patience)"
cd /opt/scanopy/backend
CARGO_BUILD_JOBS="$(get_parallel_jobs)" $STD cargo build --release --bin server --bin generate-fixtures
$STD ./target/release/generate-fixtures --output-dir /opt/scanopy/ui/src/lib/data
mv ./target/release/server /usr/bin/scanopy-server
msg_ok "Built Scanopy Server"
msg_info "Creating frontend UI"
export PUBLIC_SERVER_HOSTNAME=default
export PUBLIC_SERVER_PORT=""
cd /opt/scanopy/ui
$STD npm ci --no-fund --no-audit
$STD npm run build
msg_ok "Created frontend UI"
if [[ -f /etc/systemd/system/scanopy-daemon.service ]]; then
fetch_and_deploy_gh_release "Scanopy Daemon" "scanopy/scanopy" "singlefile" "latest" "/usr/local/bin" "scanopy-daemon-linux-$(arch_resolve)"
@@ -66,26 +81,6 @@ function update_script() {
msg_info "Starting services"
systemctl start scanopy-server
healthy=0
for _ in {1..30}; do
if curl -fsS -o /dev/null http://127.0.0.1:60072/api/health 2>/dev/null; then
healthy=1
break
fi
sleep 2
done
if [[ "$healthy" -ne 1 ]]; then
systemctl stop scanopy-server
[[ -f /usr/bin/scanopy-server.bak ]] && mv -f /usr/bin/scanopy-server.bak /usr/bin/scanopy-server
mv -f /opt/scanopy/.env.bak /opt/scanopy/.env
mv -f /etc/systemd/system/scanopy-server.service.bak /etc/systemd/system/scanopy-server.service
systemctl daemon-reload
systemctl start scanopy-server
msg_error "New server did not answer /api/health, restored the previous version"
exit 1
fi
rm -rf /opt/scanopy/backend /opt/scanopy/ui
rm -f /usr/bin/scanopy-server.bak /opt/scanopy/.env.bak /etc/systemd/system/scanopy-server.service.bak
[[ -f /etc/systemd/system/scanopy-daemon.service ]] && systemctl start scanopy-daemon
msg_ok "Updated successfully!"
fi
-25
View File
@@ -31,31 +31,6 @@ function update_script() {
exit
fi
if [[ ! -f /var/lib/clickhouse/user_scripts/histogramQuantile ]]; then
fetch_and_deploy_gh_release "histogram-quantile" "SigNoz/signoz" "prebuild" "histogram-quantile/v0.0.1" "/opt/histogram-quantile" "histogram-quantile_linux_$(arch_resolve).tar.gz"
msg_info "Adding ClickHouse histogramQuantile Function"
mkdir -p /var/lib/clickhouse/user_scripts
install -m 755 -o clickhouse -g clickhouse /opt/histogram-quantile/histogram-quantile /var/lib/clickhouse/user_scripts/histogramQuantile
cat <<EOF >/etc/clickhouse-server/histogram_quantile_function.yaml
functions:
name: histogramQuantile
type: executable
format: CSV
command: ./histogramQuantile
return_type: Float64
argument:
- name: buckets
type: Array(Float64)
- name: counts
type: Array(Float64)
- name: quantile
type: Float64
EOF
systemctl restart clickhouse-server
msg_ok "Added ClickHouse histogramQuantile Function"
fi
if check_for_gh_release "signoz" "SigNoz/signoz"; then
msg_info "Stopping Services"
systemctl stop signoz
+1 -1
View File
@@ -111,7 +111,7 @@ Type=simple
User=root
WorkingDirectory=/opt/borg-ui
EnvironmentFile=/opt/borg-ui/.env
ExecStart=/opt/borg-ui/.venv/bin/gunicorn app.main:app --bind 0.0.0.0:8081 --workers 1 --worker-class uvicorn.workers.UvicornWorker --timeout 300
ExecStart=/opt/borg-ui/.venv/bin/gunicorn app.main:app --bind 0.0.0.0:8081 --workers 2 --worker-class uvicorn.workers.UvicornWorker --timeout 300
Restart=on-failure
RestartSec=5
+67 -10
View File
@@ -13,16 +13,40 @@ setting_up_container
network_check
update_os
PG_VERSION=17 setup_postgresql
PG_DB_NAME="scanopy_db" PG_DB_USER="scanopy" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db
fetch_and_deploy_gh_release "Scanopy" "scanopy/scanopy" "singlefile" "latest" "/usr/bin" "scanopy-server-linux-$(arch_resolve)"
mv -f /usr/bin/Scanopy /usr/bin/scanopy-server
msg_info "Installing Dependencies"
$STD apt install -y \
build-essential \
libssl-dev \
pkg-config
msg_ok "Installed Dependencies"
msg_info "Configuring Scanopy"
mkdir -p /opt/scanopy
PG_VERSION=17 setup_postgresql
NODE_VERSION="24" setup_nodejs
PG_DB_NAME="scanopy_db" PG_DB_USER="scanopy" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db
fetch_and_deploy_gh_release "Scanopy" "scanopy/scanopy" "tarball" "latest" "/opt/scanopy"
TOOLCHAIN="$(grep "channel" /opt/scanopy/backend/rust-toolchain.toml | awk -F\" '{print $2}')"
RUST_TOOLCHAIN=$TOOLCHAIN setup_rust
msg_info "Building Scanopy Server (patience)"
cd /opt/scanopy/backend
CARGO_BUILD_JOBS="$(get_parallel_jobs)" $STD cargo build --release --bin server --bin generate-fixtures
$STD ./target/release/generate-fixtures --output-dir /opt/scanopy/ui/src/lib/data
mv ./target/release/server /usr/bin/scanopy-server
msg_ok "Built Scanopy Server"
msg_info "Creating frontend UI"
export PUBLIC_SERVER_HOSTNAME=default
export PUBLIC_SERVER_PORT=""
cd /opt/scanopy/ui
$STD npm ci --no-fund --no-audit
$STD npm run build
msg_ok "Created frontend UI"
msg_info "Configuring server for first-run"
cat <<EOF >/opt/scanopy/.env
### - SERVER
SCANOPY_DATABASE_URL=postgresql://$PG_DB_USER:$PG_DB_PASS@localhost:5432/$PG_DB_NAME
SCANOPY_WEB_EXTERNAL_PATH="/opt/scanopy/ui/build"
SCANOPY_PUBLIC_URL=http://${LOCAL_IP}:60072
SCANOPY_SERVER_PORT=60072
SCANOPY_LOG_LEVEL=info
@@ -49,9 +73,7 @@ SCANOPY_HEARTBEAT_INTERVAL=30
### - see https://github.com/scanopy/scanopy/blob/main/docs/CONFIGURATION.md for more options
EOF
msg_ok "Configured Scanopy"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/scanopy-server.service
[Unit]
Description=Scanopy Network Discovery Server
@@ -59,7 +81,7 @@ After=network.target postgresql.service
[Service]
Type=simple
WorkingDirectory=/opt/scanopy
WorkingDirectory=/opt/scanopy/backend
EnvironmentFile=/opt/scanopy/.env
ExecStart=/usr/bin/scanopy-server
Restart=always
@@ -70,8 +92,43 @@ StandardError=journal
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now scanopy-server
msg_ok "Created Service"
# Creating short script to configure scanopy-daemon
# cat <<EOF >~/configure_daemon.sh
# #!/usr/bin/env bash
#
# echo "Auto-configuring integrated daemon..."
#
# NETWORK_ID="\$(sudo -u postgres psql -1 -t -d "${PG_DB_NAME}" -c 'SELECT id FROM networks;')"
# API_KEY="\$(sudo -u postgres psql -1 -t -d "${PG_DB_NAME}" -c 'SELECT key FROM api_keys;')"
#
# cat <<END >/etc/systemd/system/scanopy-daemon.service
# [Unit]
# Description=Scanopy Network Discovery Daemon
# After=network-online.target
# Wants=network-online.target
#
# [Service]
# Type=simple
# User=root
# ExecStart=/usr/bin/scanopy-daemon --server-url http://127.0.0.1:60072 --network-id \${NETWORK_ID} --daemon-api-key \${API_KEY} --mode push
# Restart=always
# RestartSec=10
# StandardOutput=journal
# StandardError=journal
#
# [Install]
# WantedBy=multi-user.target
# END
#
# systemctl enable -q --now scanopy-daemon
# echo "Scanopy daemon configured and running"
#
# EOF
# chmod +x ~/configure_daemon.sh
msg_ok "Scanopy server running - please create an account, daemon API key and daemon in the Scanopy UI."
motd_ssh
customize
-22
View File
@@ -36,28 +36,6 @@ export DEBIAN_FRONTEND=noninteractive
$STD apt install -y clickhouse-server clickhouse-client
msg_ok "Setup ClickHouse"
fetch_and_deploy_gh_release "histogram-quantile" "SigNoz/signoz" "prebuild" "histogram-quantile/v0.0.1" "/opt/histogram-quantile" "histogram-quantile_linux_$(arch_resolve).tar.gz"
msg_info "Setting up ClickHouse histogramQuantile Function"
mkdir -p /var/lib/clickhouse/user_scripts
install -m 755 -o clickhouse -g clickhouse /opt/histogram-quantile/histogram-quantile /var/lib/clickhouse/user_scripts/histogramQuantile
cat <<EOF >/etc/clickhouse-server/histogram_quantile_function.yaml
functions:
name: histogramQuantile
type: executable
format: CSV
command: ./histogramQuantile
return_type: Float64
argument:
- name: buckets
type: Array(Float64)
- name: counts
type: Array(Float64)
- name: quantile
type: Float64
EOF
msg_ok "Setup ClickHouse histogramQuantile Function"
msg_info "Setting up Zookeeper"
ZOOURL=$(curl -fsSL https://dlcdn.apache.org/zookeeper/current/ | grep -o 'apache-zookeeper-[0-9.]\+-bin\.tar\.gz' | head -n1)
curl -fsSL "https://dlcdn.apache.org/zookeeper/current/$ZOOURL" -o ~/zookeeper.tar.gz
+2 -12
View File
@@ -199,7 +199,6 @@ function install() {
sed -i "s/^KOMODO_INIT_ADMIN_PASSWORD=changeme/KOMODO_INIT_ADMIN_PASSWORD=${ADMIN_PASSWORD}/" "$COMPOSE_ENV"
sed -i "s/^KOMODO_WEBHOOK_SECRET=.*/KOMODO_WEBHOOK_SECRET=${WEBHOOK_SECRET}/" "$COMPOSE_ENV"
sed -i "s/^KOMODO_JWT_SECRET=.*/KOMODO_JWT_SECRET=${JWT_SECRET}/" "$COMPOSE_ENV"
sed -i "s|^KOMODO_HOST=.*|KOMODO_HOST=http://${LOCAL_IP}:${DEFAULT_PORT}|" "$COMPOSE_ENV"
msg_ok "Configured environment"
msg_info "Starting ${APP}"
@@ -215,23 +214,14 @@ function install() {
} >>~/komodo.creds
echo ""
msg_info "Waiting for ${APP} to answer"
for _ in $(seq 1 60); do
curl -fsS --max-time 3 "http://127.0.0.1:${DEFAULT_PORT}" >/dev/null 2>&1 && break
sleep 3
done
if curl -fsS --max-time 3 "http://127.0.0.1:${DEFAULT_PORT}" >/dev/null 2>&1; then
msg_ok "${APP} is reachable at: ${BL}http://${LOCAL_IP}:${DEFAULT_PORT}${CL}"
else
msg_error "${APP} did not come up - check: docker logs komodo-core-1"
fi
msg_ok "${APP} is reachable at: ${BL}http://${LOCAL_IP}:${DEFAULT_PORT}${CL}"
echo ""
echo -e " Komodo Credentials"
echo -e " =================="
echo -e " User : admin"
echo -e " Password: ${ADMIN_PASSWORD}"
echo ""
msg_ok "Credentials saved to ~/komodo.creds"
msg_info "Credentials saved to ~/komodo.creds"
}
# ==============================================================================