Compare commits

..

2 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
2cc8f35a13 fix(sonarqube): clean up temp file after zip extraction
The SonarQube update function (ct/sonarqube.sh) never deleted the
downloaded zip file (~200-500 MB) from /tmp after extraction. On LXC
containers with 4-8 GB disks, this accumulates with every update and
can eventually fill the disk.

Also add explicit cleanup in the install script instead of relying
solely on cleanup_lxc() pattern matching.
2026-04-13 15:18:07 +02:00
CanbiZ (MickLesk)
352e6c8abf fix(core): remove unused TEMP_DIR mktemp leak in build_container
The build_container() function created a temp directory via mktemp -d and
pushd into it, but never popd or rm -rf. The directory was not used for
anything — FUNCTIONS_FILE_PATH is downloaded into a variable, not a file.

Remove the mktemp -d and pushd entirely to eliminate the leak.
2026-04-13 15:06:06 +02:00
9 changed files with 32 additions and 70 deletions

View File

@@ -446,21 +446,10 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Slskd: Remove stale Soularr lock file on startup and redirect logs to stderr [@MickLesk](https://github.com/MickLesk) ([#13669](https://github.com/community-scripts/ProxmoxVE/pull/13669))
- Bambuddy: preserve database and archive on update [@Copilot](https://github.com/Copilot) ([#13706](https://github.com/community-scripts/ProxmoxVE/pull/13706))
- #### ✨ New Features
- Immich: Pin version to 2.7.5 [@vhsdream](https://github.com/vhsdream) ([#13715](https://github.com/community-scripts/ProxmoxVE/pull/13715))
- Bytestash: auto backup/restore data on update [@MickLesk](https://github.com/MickLesk) ([#13707](https://github.com/community-scripts/ProxmoxVE/pull/13707))
- OpenCloud: pin version to 6.0.0 [@vhsdream](https://github.com/vhsdream) ([#13691](https://github.com/community-scripts/ProxmoxVE/pull/13691))
- #### 🔧 Refactor
- core: remove unused TEMP_DIR mktemp leak in build_container / clean sonarqube [@MickLesk](https://github.com/MickLesk) ([#13708](https://github.com/community-scripts/ProxmoxVE/pull/13708))
## 2026-04-12
### 🚀 Updated Scripts

View File

@@ -39,9 +39,6 @@ function update_script() {
msg_info "Backing up Configuration and Data"
cp /opt/bambuddy/.env /opt/bambuddy.env.bak
cp -r /opt/bambuddy/data /opt/bambuddy_data_bak
[[ -f /opt/bambuddy/bambuddy.db ]] && cp /opt/bambuddy/bambuddy.db /opt/bambuddy.db.bak
[[ -f /opt/bambuddy/bambutrack.db ]] && cp /opt/bambuddy/bambutrack.db /opt/bambutrack.db.bak
[[ -d /opt/bambuddy/archive ]] && cp -r /opt/bambuddy/archive /opt/bambuddy_archive_bak
msg_ok "Backed up Configuration and Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bambuddy" "maziggy/bambuddy" "tarball" "latest" "/opt/bambuddy"
@@ -62,14 +59,8 @@ function update_script() {
mkdir -p /opt/bambuddy/data
cp /opt/bambuddy.env.bak /opt/bambuddy/.env
cp -r /opt/bambuddy_data_bak/. /opt/bambuddy/data/
[[ -f /opt/bambuddy.db.bak ]] && cp /opt/bambuddy.db.bak /opt/bambuddy/bambuddy.db
[[ -f /opt/bambutrack.db.bak ]] && cp /opt/bambutrack.db.bak /opt/bambuddy/bambutrack.db
if [[ -d /opt/bambuddy_archive_bak ]]; then
mkdir -p /opt/bambuddy/archive
cp -r /opt/bambuddy_archive_bak/. /opt/bambuddy/archive/
fi
rm -f /opt/bambuddy.env.bak /opt/bambuddy.db.bak /opt/bambutrack.db.bak
rm -rf /opt/bambuddy_data_bak /opt/bambuddy_archive_bak
rm -f /opt/bambuddy.env.bak
rm -rf /opt/bambuddy_data_bak
msg_ok "Restored Configuration and Data"
msg_info "Starting Service"

View File

@@ -29,41 +29,28 @@ function update_script() {
exit
fi
if check_for_gh_release "bytestash" "jordan-dalby/ByteStash"; then
msg_info "Stopping Services"
systemctl stop bytestash-backend bytestash-frontend
msg_ok "Services Stopped"
read -rp "${TAB3}Did you make a backup via application WebUI? (y/n): " backuped
if [[ "$backuped" =~ ^[Yy]$ ]]; then
msg_info "Stopping Services"
systemctl stop bytestash-backend bytestash-frontend
msg_ok "Services Stopped"
msg_info "Backing up data"
tmp_dir="/opt/bytestash-data-backup"
mkdir -p "$tmp_dir"
if [[ -d /opt/bytestash/data ]]; then
cp -r /opt/bytestash/data "$tmp_dir"/data
elif [[ -d /opt/data ]]; then
cp -r /opt/data "$tmp_dir"/data
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bytestash" "jordan-dalby/ByteStash" "tarball"
msg_info "Configuring ByteStash"
cd /opt/bytestash/server
$STD npm install
cd /opt/bytestash/client
$STD npm install
msg_ok "Updated ByteStash"
msg_info "Starting Services"
systemctl start bytestash-backend bytestash-frontend
msg_ok "Started Services"
else
msg_error "PLEASE MAKE A BACKUP FIRST!"
exit
fi
msg_ok "Data backed up"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bytestash" "jordan-dalby/ByteStash" "tarball"
msg_info "Restoring data"
if [[ -d "$tmp_dir"/data ]]; then
mkdir -p /opt/bytestash/data
cp -r "$tmp_dir"/data/* /opt/bytestash/data/
rm -rf "$tmp_dir"
fi
msg_ok "Data restored"
msg_info "Configuring ByteStash"
cd /opt/bytestash/server
$STD npm install
cd /opt/bytestash/client
$STD npm install
msg_ok "Updated ByteStash"
msg_info "Starting Services"
systemctl start bytestash-backend bytestash-frontend
msg_ok "Started Services"
msg_ok "Updated successfully!"
fi
exit

View File

@@ -109,7 +109,7 @@ EOF
msg_ok "Image-processing libraries up to date"
fi
RELEASE="v2.7.5"
RELEASE="v2.7.4"
if check_for_gh_release "Immich" "immich-app/immich" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then
if [[ $(cat ~/.immich) > "2.5.1" ]]; then
msg_info "Enabling Maintenance Mode"

View File

@@ -38,7 +38,6 @@ function update_script() {
cp /opt/zerobyte/.env /opt/zerobyte.env.bak
msg_ok "Backed up Configuration"
ensure_dependencies git
NODE_VERSION="24" setup_nodejs
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "zerobyte" "nicotsx/zerobyte" "tarball"

View File

@@ -295,7 +295,7 @@ ML_DIR="${APP_DIR}/machine-learning"
GEO_DIR="${INSTALL_DIR}/geodata"
mkdir -p {"${APP_DIR}","${UPLOAD_DIR}","${GEO_DIR}","${INSTALL_DIR}"/cache}
fetch_and_deploy_gh_release "Immich" "immich-app/immich" "tarball" "v2.7.5" "$SRC_DIR"
fetch_and_deploy_gh_release "Immich" "immich-app/immich" "tarball" "v2.7.4" "$SRC_DIR"
PNPM_VERSION="$(jq -r '.packageManager | split("@")[1] | split("+")[0]' ${SRC_DIR}/package.json)"
NODE_VERSION="24" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs

View File

@@ -48,15 +48,12 @@ if [[ ${soularr,,} =~ ^(y|yes)$ ]]; then
#!/usr/bin/env bash
if ps aux | grep "[s]oularr.py" >/dev/null; then
echo "Soularr is already running. Exiting..." >&2
echo "Soularr is already running. Exiting..."
exit 1
else
source /opt/soularr/venv/bin/activate
uv run python3 -u /opt/soularr/soularr.py --config-dir /opt/soularr
fi
# Remove stale lock file from previous ungraceful exit
rm -f "/opt/soularr/.soularr.lock"
source /opt/soularr/venv/bin/activate
uv run python3 -u /opt/soularr/soularr.py --config-dir /opt/soularr 2>&1
EOF
chmod +x /opt/soularr/run.sh
deactivate

View File

@@ -18,7 +18,6 @@ echo "davfs2 davfs2/suid_file boolean false" | debconf-set-selections
$STD apt-get install -y \
bzip2 \
fuse3 \
git \
sshfs \
davfs2 \
openssh-client

View File

@@ -317,7 +317,7 @@ function default_settings() {
# Determine available network modes based on bridge count
local DEFAULT_WAN_BRG
DEFAULT_WAN_BRG=$(echo "$AVAILABLE_BRIDGES" | grep -v "^${BRG}$" | head -n1 || true)
DEFAULT_WAN_BRG=$(echo "$AVAILABLE_BRIDGES" | grep -v "^${BRG}$" | head -n1)
if [ "$BRIDGE_COUNT" -ge 2 ]; then
# Multiple bridges available - offer dual or single mode
@@ -509,7 +509,7 @@ function advanced_settings() {
# Build WAN bridge selection from available bridges (excluding LAN bridge)
local WAN_BRIDGES
WAN_BRIDGES=$(get_available_bridges | grep -v "^${BRG}$" || true)
WAN_BRIDGES=$(get_available_bridges | grep -v "^${BRG}$")
if [ -z "$WAN_BRIDGES" ]; then
msg_error "No additional bridge available for WAN. Only '${BRG}' exists."
msg_error "Create a second bridge (e.g. vmbr1) in Proxmox network config first."
@@ -738,8 +738,8 @@ done
msg_info "Creating a OPNsense VM"
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
-name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
pvesm alloc $STORAGE $VMID $DISK0 4M &>/dev/null
qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} &>/dev/null
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
qm set $VMID \
-efidisk0 ${DISK0_REF}${FORMAT} \
-scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \