Compare commits

..
Author SHA1 Message Date
MickLesk cbe8fdacaf Pass PHP modules as PHP_MODULE
setup_php reads PHP_MODULE; PHP_MODULES was ignored, so matomo never got
php-ldap.
2026-11-28 13:53:58 +01:00
MickLesk 926a8deaef Run setup_php before the update moves the app away
In monica, part-db, privatebin, freshrss and wallos setup_php ran after
the app, its database or its uploads were moved or deleted. A failed
PHP install (Sury mirror sync) left the container without its app.
2026-11-28 13:53:57 +01:00
Rögl-Brunner Michel 445374b018 Set up install PHP version in ct update scripts 2026-11-27 14:55:55 +01:00
62 changed files with 121 additions and 325 deletions

No files matched your search

+1 -38
View File
@@ -587,31 +587,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-11-28
### 🆕 New Scripts
- DokuWiki [@MickLesk](https://github.com/MickLesk) ([#19138](https://github.com/community-scripts/ProxmoxVE/pull/19138))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Garage: use published stable releases for install and update [@mormied22](https://github.com/mormied22) ([#19084](https://github.com/community-scripts/ProxmoxVE/pull/19084))
### 💾 Core
- Leave a legacy version file to the app it belongs to [@MickLesk](https://github.com/MickLesk) ([core#317](https://github.com/community-scripts/core/pull/317))
- incus: draw the banner when the header cache belongs to another user [@MickLesk](https://github.com/MickLesk) ([core#318](https://github.com/community-scripts/core/pull/318))
- Incus: Report Incus VM runs to telemetry [@MickLesk](https://github.com/MickLesk) ([core#319](https://github.com/community-scripts/core/pull/319))
- PHP: Keep Sury from pulling a second PHP in, and read the version from packages [@MickLesk](https://github.com/MickLesk) ([core#316](https://github.com/community-scripts/core/pull/316))
- Give PVE containers from linuxcontainers.org images the Proxmox templates Base set [@MickLesk](https://github.com/MickLesk) ([core#315](https://github.com/community-scripts/core/pull/315))
- PHP: keep modules, pools and settings when setup_php changes the PHP version [@MickLesk](https://github.com/MickLesk) ([core#314](https://github.com/community-scripts/core/pull/314))
### 📚 Documentation
- docs: add 9.3 support [@cwmoriarty](https://github.com/cwmoriarty) ([#19129](https://github.com/community-scripts/ProxmoxVE/pull/19129))
## 2026-11-27
### 🆕 New Scripts
@@ -620,25 +595,13 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- yourls: bump PHP from 8.3 to 8.4 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#19104](https://github.com/community-scripts/ProxmoxVE/pull/19104))
- tandoor: bump Python from 3.13 to 3.14 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#19110](https://github.com/community-scripts/ProxmoxVE/pull/19110))
- poznote: bump PHP from 8.4 to 8.5 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#19102](https://github.com/community-scripts/ProxmoxVE/pull/19102))
- suggestarr: bump Python from 3.12 to 3.13 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#19109](https://github.com/community-scripts/ProxmoxVE/pull/19109))
- romm: bump Python from 3.13 to 3.14 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#19108](https://github.com/community-scripts/ProxmoxVE/pull/19108))
- norish: bump Python from 3.14 to 3.15 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#19107](https://github.com/community-scripts/ProxmoxVE/pull/19107))
- mealie: bump Python from 3.12 to 3.14 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#19106](https://github.com/community-scripts/ProxmoxVE/pull/19106))
- #### ✨ New Features
- Gramps Web: install AI chat dependencies [@owenvoke](https://github.com/owenvoke) ([#19092](https://github.com/community-scripts/ProxmoxVE/pull/19092))
### 💾 Core
- Incus: offer the LAN network IncusOS gives instances, and rank NAT last [@MickLesk](https://github.com/MickLesk) ([core#313](https://github.com/community-scripts/core/pull/313))
- core: wait for the package lists lock instead of taking it for a bad mirror [@MickLesk](https://github.com/MickLesk) ([core#304](https://github.com/community-scripts/core/pull/304))
- incus: check an imported VM image on the target remote [@MickLesk](https://github.com/MickLesk) ([core#309](https://github.com/community-scripts/core/pull/309))
- incus: check an imported VM image on the target remote [@MickLesk](https://github.com/MickLesk) ([core#309](https://github.com/community-scripts/core/pull/309))
- Offer no DNS retry to a container without a connection out [@MickLesk](https://github.com/MickLesk) ([core#310](https://github.com/community-scripts/core/pull/310))
- Refuse a static address without a gateway before pct create [@MickLesk](https://github.com/MickLesk) ([core#312](https://github.com/community-scripts/core/pull/312))
- Protect a container once its install succeeded, not at creation [@MickLesk](https://github.com/MickLesk) ([core#311](https://github.com/community-scripts/core/pull/311))
+1 -1
View File
@@ -76,7 +76,7 @@ guest's own package manager.
| Component | Details |
| --------- | ------- |
| **Proxmox VE** | 8.0 – 8.4, or 9.0 – 9.3 |
| **Proxmox VE** | 8.0 – 8.4, or 9.0 – 9.2 |
| **Access** | Root shell on the Proxmox host |
| **Network** | Internet access during installation |
-1
View File
@@ -6,7 +6,6 @@ This project currently supports the following versions of Proxmox VE (PVE):
| Version | Supported |
| ------- | ------------------ |
| 9.3.x | :white_check_mark: |
| 9.2.x | :white_check_mark: |
| 9.1.x | :white_check_mark: |
| 9.0.x | :white_check_mark: |
+1
View File
@@ -40,6 +40,7 @@ function update_script() {
create_backup /opt/chevereto/app/env.php /opt/chevereto/content
PHP_VERSION="8.3" PHP_FPM="YES" PHP_UPLOAD_MAX_FILESIZE="512M" PHP_POST_MAX_SIZE="512M" PHP_MAX_EXECUTION_TIME="600" setup_php
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="images" fetch_and_deploy_gh_release "chevereto" "chevereto/chevereto" "tarball"
restore_backup
+1
View File
@@ -39,6 +39,7 @@ function update_script() {
systemctl stop nginx php8.4-fpm
msg_ok "Stopped Cypht"
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="soap,ldap" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "cypht" "cypht-org/cypht" "prebuild" "latest" "/opt/cypht" "cypht.tar.gz"
msg_info "Updating Cypht"
+1
View File
@@ -36,6 +36,7 @@ function update_script() {
systemctl stop databasement-worker databasement-scheduler php8.5-fpm
msg_ok "Stopped Databasement"
PHP_VERSION="8.5" PHP_FPM="YES" PHP_MODULE="mongodb,smbclient" setup_php
setup_composer
NODE_VERSION="22" setup_nodejs
-66
View File
@@ -1,66 +0,0 @@
#!/usr/bin/env bash
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/dokuwiki/dokuwiki
APP="DokuWiki"
var_tags="${var_tags:-wiki;documentation}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-yes}"
var_unprivileged="${var_unprivileged:-1}"
export var_admin_user="${var_admin_user:-}"
export var_admin_pass="${var_admin_pass:-}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/dokuwiki ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "dokuwiki" "dokuwiki/dokuwiki"; then
msg_info "Stopping DokuWiki"
systemctl stop nginx php8.4-fpm
msg_ok "Stopped DokuWiki"
fetch_and_deploy_gh_release "dokuwiki" "dokuwiki/dokuwiki" "prebuild" "latest" "/opt/dokuwiki" "dokuwiki-*.tgz"
msg_info "Removing obsolete DokuWiki files"
grep -E '^[[:alnum:]_][^[:space:]]*$' /opt/dokuwiki/data/deleted.files | grep -Fv '..' | sed 's|^|/opt/dokuwiki/|' | xargs -r -d '\n' rm -rf --
rm -f /opt/dokuwiki/install.php /opt/dokuwiki/data/cache/messages.txt
chown -R www-data:www-data /opt/dokuwiki
msg_ok "Removed obsolete DokuWiki files"
msg_info "Starting DokuWiki"
systemctl start php8.4-fpm nginx
msg_ok "Started DokuWiki"
msg_ok "Updated successfully!"
fi
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 "${GATEWAY}${BGN}http://${IP}${CL}"
echo -e "${INFO}${YW}Admin login: /opt/dokuwiki_data/.env (inside the container)${CL}"
+1
View File
@@ -46,6 +46,7 @@ function update_script() {
create_backup /opt/domain-monitor/.env
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_FPM="YES" setup_php
setup_composer
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "domain-monitor" "Hosteroid/domain-monitor" "prebuild" "latest" "/opt/domain-monitor" "domain-monitor-v*.zip"
+1
View File
@@ -40,6 +40,7 @@ function update_script() {
systemctl stop nginx cron php8.4-fpm
msg_ok "Stopped Services"
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="ldap" setup_php
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="data custom client/custom" fetch_and_deploy_gh_release "espo-crm" "espocrm/espocrm" "prebuild" "latest" "/opt/espocrm" "EspoCRM-*.zip"
msg_info "Migrating EspoCRM"
+1
View File
@@ -41,6 +41,7 @@ function update_script() {
msg_ok "Stopped FreeScout"
create_backup /opt/freescout/.env
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="storage Modules public/modules" fetch_and_deploy_gh_release "freescout" "freescout-help-desk/freescout" "tarball"
restore_backup
+1
View File
@@ -46,6 +46,7 @@ function update_script() {
fi
if check_for_gh_release "freshrss" "FreshRSS/FreshRSS"; then
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_MODULE="xml,intl" setup_php
msg_info "Stopping Apache2"
systemctl stop apache2
msg_ok "Stopped Apache2"
+59 -44
View File
@@ -33,58 +33,73 @@ color
catch_errors
update_deb_based() {
systemctl restart garage
if [[ ! -f /usr/local/bin/garage ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
GITEA_RELEASE=$(curl -fsSL https://api.github.com/repos/deuxfleurs-org/garage/tags | jq -r '.[0].name')
if [[ "${GITEA_RELEASE}" != "$(cat ~/.garage 2>/dev/null)" ]] || [[ ! -f ~/.garage ]]; then
msg_info "Stopping Service"
systemctl stop garage
msg_ok "Stopped Service"
msg_info "Backing Up Data"
cp /usr/local/bin/garage /usr/local/bin/garage.old 2>/dev/null || true
cp /etc/garage.toml /etc/garage.toml.bak 2>/dev/null || true
msg_ok "Backed Up Data"
msg_info "Updating Garage"
curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" -o /usr/local/bin/garage
chmod +x /usr/local/bin/garage
echo "${GITEA_RELEASE}" >~/.garage
msg_ok "Updated Garage"
msg_info "Starting Service"
systemctl start garage
msg_ok "Started Service"
msg_ok "Updated successfully!"
else
msg_ok "No update required. Garage is already at ${GITEA_RELEASE}"
fi
}
update_alpine() {
rc-service garage restart || rc-service garage start
if [[ ! -f /usr/local/bin/garage ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
GITEA_RELEASE=$(curl -fsSL https://api.github.com/repos/deuxfleurs-org/garage/tags | jq -r '.[0].name')
if [[ "${GITEA_RELEASE}" != "$(cat ~/.garage 2>/dev/null)" ]] || [[ ! -f ~/.garage ]]; then
msg_info "Stopping Service"
rc-service garage stop || true
msg_ok "Stopped Service"
msg_info "Backing Up Data"
cp /usr/local/bin/garage /usr/local/bin/garage.old 2>/dev/null || true
cp /etc/garage.toml /etc/garage.toml.bak 2>/dev/null || true
msg_ok "Backed Up Data"
msg_info "Updating Garage"
curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" -o /usr/local/bin/garage
chmod +x /usr/local/bin/garage
echo "${GITEA_RELEASE}" >~/.garage
msg_ok "Updated Garage"
msg_info "Starting Service"
rc-service garage start || rc-service garage restart
msg_ok "Started Service"
msg_ok "Updated successfully!"
else
msg_ok "No update required. Garage is already at ${GITEA_RELEASE}"
fi
}
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /usr/local/bin/garage ]]; then
msg_error "No Garage installation found"
exit 1
fi
local garage_release garage_binary
garage_release=$(curl -fsSL https://git.deuxfleurs.fr/api/v1/repos/Deuxfleurs/garage/releases/latest |
jq -er 'select(.draft == false and .prerelease == false) | .tag_name | strings | select(length > 0)') || {
msg_error "Could not determine the latest stable Garage release"
exit 1
}
if [[ -f ~/.garage && "$garage_release" == "$(<~/.garage)" ]]; then
msg_ok "No update required. Garage is already at ${garage_release}"
exit 0
fi
msg_info "Downloading Garage ${garage_release}"
garage_binary=$(mktemp /usr/local/bin/garage.XXXXXX)
if ! download_file "https://garagehq.deuxfleurs.fr/_releases/${garage_release}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" "$garage_binary"; then
rm -f "$garage_binary"
exit 1
fi
msg_ok "Downloaded Garage ${garage_release}"
msg_info "Backing up Garage"
cp /usr/local/bin/garage /usr/local/bin/garage.old 2>/dev/null || true
cp /etc/garage.toml /etc/garage.toml.bak 2>/dev/null || true
msg_ok "Backed up Garage"
msg_info "Updating Garage"
chmod 755 "$garage_binary"
mv -f "$garage_binary" /usr/local/bin/garage
msg_ok "Updated Garage"
msg_info "Restarting Garage"
run_os_update
msg_ok "Restarted Garage"
printf '%s\n' "$garage_release" >~/.garage
msg_ok "Updated Garage successfully"
exit 0
}
start
@@ -93,5 +108,5 @@ description
msg_ok "Completed successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW}Use this Garage S3 API endpoint${CL}"
echo -e "${GATEWAY}${BGN}http://${IP}:3900${CL}"
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
echo -e "${GATEWAY}${BGN}http://${IP}${CL}"
+1
View File
@@ -33,6 +33,7 @@ function update_script() {
fi
if check_for_gh_release "grav" "getgrav/grav"; then
PHP_FPM="YES" setup_php
msg_info "Creating Backup"
cd /opt/grav
bin/grav backup -nq
+1
View File
@@ -61,6 +61,7 @@ function update_script() {
/opt/hortusfox/public/img \
/opt/hortusfox/public/themes
PHP_VERSION="8.3" PHP_APACHE="YES" setup_php
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="public/attachments public/backup public/exports public/snd" fetch_and_deploy_gh_release "hortusfox" "danielbrendel/hortusfox-web" "tarball"
restore_backup
+1
View File
@@ -38,6 +38,7 @@ function update_script() {
$STD supervisorctl stop all
msg_ok "Services Stopped"
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="pdo-pgsql" setup_php
setup_composer
NODE_VERSION="22" setup_nodejs
PG_VERSION="17" setup_postgresql
+1
View File
@@ -38,6 +38,7 @@ function update_script() {
create_backup /opt/invoiceninja/.env /opt/invoiceninja/storage /opt/invoiceninja/public/storage /opt/invoiceninja/vendor/beganovich/snappdf/versions
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="soap" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "invoiceninja" "invoiceninja/invoiceninja" "prebuild" "latest" "/opt/invoiceninja" "invoiceninja.tar.gz"
restore_backup
+1
View File
@@ -48,6 +48,7 @@ EOF
create_backup /opt/invoiceshelf/.env
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="bcmath,gd,intl,xml,zip,pdo_pgsql,mbstring,curl,exif" setup_php
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="storage" fetch_and_deploy_gh_release "invoiceshelf" "InvoiceShelf/InvoiceShelf" "tarball"
restore_backup
+1
View File
@@ -40,6 +40,7 @@ function update_script() {
create_backup /opt/koel/.env /opt/koel/storage /opt/koel/public/img
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "koel" "koel/koel" "prebuild" "latest" "/opt/koel" "koel-*.tar.gz"
restore_backup
+1
View File
@@ -39,6 +39,7 @@ function update_script() {
create_backup /opt/leantime/config/.env
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_FPM="YES" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "leantime" "Leantime/leantime" "prebuild" "latest" "/opt/leantime" Leantime*.tar.gz
restore_backup
+1
View File
@@ -38,6 +38,7 @@ function update_script() {
msg_ok "Stopped Services"
create_backup /opt/librenms/.env /opt/librenms/config.php
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="cli,snmp,gmp" setup_php
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="rrd" fetch_and_deploy_gh_release "librenms" "librenms/librenms" "tarball"
restore_backup
+1
View File
@@ -43,6 +43,7 @@ function update_script() {
/opt/lychee/public/uploads \
/opt/lychee/public/dist
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="bcmath,ldap,exif,gd,intl,imagick,redis,zip,pdo_pgsql,pcntl" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "lychee" "LycheeOrg/Lychee" "prebuild" "latest" "/opt/lychee" "Lychee.zip"
restore_backup
+1
View File
@@ -38,6 +38,7 @@ function update_script() {
create_backup /opt/matomo/config/config.ini.php /opt/matomo/misc/user /root/matomo.creds
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="pdo_mysql,gd,mbstring,xml,curl,intl,zip,ldap" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "matomo" "matomo-org/matomo" "prebuild" "latest" "/opt/matomo" "matomo-*.zip"
msg_info "Setting up Matomo"
+1 -1
View File
@@ -45,7 +45,7 @@ function update_script() {
msg_ok "Backup completed"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "mealie" "mealie-recipes/mealie" "tarball"
PYTHON_VERSION="3.14" UV_PROJECT_DIR="/opt/mealie" setup_uv
PYTHON_VERSION="3.12" UV_PROJECT_DIR="/opt/mealie" setup_uv
msg_info "Restoring Configuration"
mv -f /opt/mealie.env /opt/mealie/mealie.env
+1
View File
@@ -39,6 +39,7 @@ function update_script() {
fi
if check_for_gh_release "monica" "monicahq/monica"; then
PHP_VERSION="8.2" PHP_APACHE="YES" PHP_MODULE="mysqli,pdo-mysql" setup_php
msg_info "Stopping Service"
systemctl stop apache2
msg_ok "Stopped Service"
+1
View File
@@ -40,6 +40,7 @@ function update_script() {
systemctl stop nagios
msg_ok "Stopped Nagios"
PHP_APACHE="YES" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nagios" "NagiosEnterprises/nagioscore" "tarball"
msg_info "Building Nagios Core"
+1
View File
@@ -36,6 +36,7 @@ function update_script() {
systemctl stop netalertx
msg_ok "Stopped NetAlertX"
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="curl,sqlite3" setup_php
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP=".venv" fetch_and_deploy_gh_release "netalertx" "netalertx/NetAlertX" "tarball"
msg_info "Updating NetAlertX"
+1 -1
View File
@@ -38,7 +38,7 @@ function update_script() {
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "norish" "norish-recipes/norish" "tarball"
NODE_VERSION="26" NODE_MODULE="pnpm@$(jq -r '.packageManager | split("@")[1]' /opt/norish/package.json)" setup_nodejs
PYTHON_VERSION="3.15" setup_uv
PYTHON_VERSION="3.14" setup_uv
fetch_and_deploy_gh_release "obscura" "$(sed -n 's#^OBSCURA_REPO=https://github.com/##p' /opt/norish/docker/obscura/pin.env)" "prebuild" "v$(sed -n 's/^OBSCURA_VERSION=//p' /opt/norish/docker/obscura/pin.env)" "/opt/obscura" "obscura-$(arch_resolve "x86_64" "aarch64")-linux-stealth.tar.gz"
fetch_and_deploy_gh_release "yt-dlp" "yt-dlp/yt-dlp" "singlefile" "latest" "/usr/local/bin" "$(arch_resolve "yt-dlp_linux" "yt-dlp_linux_aarch64")"
+1
View File
@@ -31,6 +31,7 @@ function update_script() {
fi
if check_for_gh_release "partdb" "Part-DB/Part-DB-server"; then
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_MODULE="xsl" PHP_POST_MAX_SIZE="100M" PHP_UPLOAD_MAX_FILESIZE="100M" setup_php
msg_info "Stopping Service"
systemctl stop apache2
msg_ok "Stopped Service"
+1
View File
@@ -40,6 +40,7 @@ function update_script() {
create_backup /opt/pixelfed/.env \
/opt/pixelfed/storage
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="bcmath,ctype,curl,exif,gd,imagick,intl,mbstring,pgsql,redis,xml,zip" PHP_UPLOAD_MAX_FILESIZE="500M" PHP_POST_MAX_SIZE="500M" PHP_MAX_EXECUTION_TIME="600" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "pixelfed" "pixelfed/pixelfed" "tarball" "latest" "/opt/pixelfed"
restore_backup
+1
View File
@@ -52,6 +52,7 @@ function update_script() {
if check_for_gh_release "poweradmin" "poweradmin/poweradmin"; then
create_backup /opt/poweradmin/config/settings.php
PHP_VERSION="8.3" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="gettext,tokenizer,sqlite3,ldap" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "poweradmin" "poweradmin/poweradmin" "tarball"
restore_backup
-1
View File
@@ -39,7 +39,6 @@ function update_script() {
create_backup /var/www/html/data
PHP_VERSION="8.5" PHP_FPM="YES" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "poznote" "timothepoznanski/poznote" "tarball"
msg_info "Deploying New Version"
+1
View File
@@ -36,6 +36,7 @@ function update_script() {
systemctl stop pricebuddy-worker
msg_ok "Stopped PriceBuddy Worker"
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MEMORY_LIMIT="2048M" setup_php
setup_composer
NODE_VERSION="22" setup_nodejs
+1
View File
@@ -30,6 +30,7 @@ function update_script() {
exit
fi
if check_for_gh_release "privatebin" "PrivateBin/PrivateBin"; then
PHP_VERSION="8.2" PHP_FPM="YES" setup_php
msg_info "Creating backup"
cp -f /opt/privatebin/cfg/conf.php /tmp/privatebin_conf.bak
msg_ok "Backup created"
+1
View File
@@ -44,6 +44,7 @@ function update_script() {
create_backup /opt/projectsend/.env /opt/projectsend/storage/app/files
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="ldap,pcntl" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "projectsend" "projectsend/projectsend" "prebuild" "latest" "/opt/projectsend"
restore_backup
+1 -1
View File
@@ -73,7 +73,7 @@ function update_script() {
/opt/romm/frontend/dist/assets/ruffle
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "romm" "rommapp/romm" "tarball" "latest" "/opt/romm"
PYTHON_VERSION="3.14" UV_PROJECT_DIR="/opt/romm" setup_uv
PYTHON_VERSION="3.13" UV_PROJECT_DIR="/opt/romm" setup_uv
echo "__version__ = \"$(cat ~/.romm)\"" >/opt/romm/backend/__version__.py
find /opt/romm/backend/alembic/versions -maxdepth 1 -type f -name '1.*.py' -delete 2>/dev/null || true
+1
View File
@@ -34,6 +34,7 @@ function update_script() {
if check_for_gh_release "rss-bridge" "RSS-Bridge/rss-bridge"; then
create_backup /opt/rss-bridge/config.ini.php
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "rss-bridge" "RSS-Bridge/rss-bridge" "tarball"
restore_backup
+1
View File
@@ -38,6 +38,7 @@ function update_script() {
create_backup /opt/shlink/.env /opt/shlink/data
PHP_VERSION="8.5" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "shlink" "shlinkio/shlink" "prebuild" "latest" "/opt/shlink" "shlink*_php8.5_dist.zip"
restore_backup
+1
View File
@@ -40,6 +40,7 @@ function update_script() {
create_backup /opt/solidtime/.env
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="bcmath,gd,intl,xml,zip,pdo_pgsql,redis,mbstring,curl" setup_php
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="storage" fetch_and_deploy_gh_release "solidtime" "solidtime-io/solidtime" "tarball"
restore_backup
+1 -1
View File
@@ -62,7 +62,7 @@ function update_script() {
msg_info "Updating Python Environment"
cd /opt/suggestarr
$STD uv venv --python 3.13 /opt/suggestarr/.venv
$STD uv venv --python 3.12 /opt/suggestarr/.venv
$STD uv pip install --python /opt/suggestarr/.venv -r /opt/suggestarr/api_service/requirements.txt
msg_ok "Updated Python Environment"
+1 -1
View File
@@ -47,7 +47,7 @@ function update_script() {
create_backup /opt/tandoor/.env
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
PYTHON_VERSION="3.14" setup_uv
PYTHON_VERSION="3.13" setup_uv
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="config api mediafiles staticfiles" fetch_and_deploy_gh_release "tandoor" "TandoorRecipes/recipes" "tarball" "latest" "/opt/tandoor"
restore_backup
+1
View File
@@ -39,6 +39,7 @@ function update_script() {
systemctl stop nginx
msg_ok "Stopped Typecho"
PHP_FPM="YES" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "typecho" "typecho/typecho" "prebuild" "latest" "/opt/typecho" "typecho.zip"
fetch_and_deploy_from_url "https://github.com/typecho/languages/releases/download/ci/langs.zip" "/opt/typecho_data/usr/langs"
+1
View File
@@ -41,6 +41,7 @@ function update_script() {
create_backup /opt/wallabag/app/config/parameters.yml
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="tidy" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wallabag" "wallabag/wallabag" "prebuild" "latest" "/opt/wallabag" "wallabag-*.tar.gz"
restore_backup
+1
View File
@@ -31,6 +31,7 @@ function update_script() {
fi
if check_for_gh_release "wallos" "ellite/Wallos"; then
PHP_VERSION="8.4" PHP_APACHE="YES" setup_php
msg_info "Creating backup"
mkdir -p /opt/logos
mv /opt/wallos/db/wallos.db /opt/wallos.db
+1
View File
@@ -37,6 +37,7 @@ function update_script() {
msg_ok "Stopped WatchState"
create_backup /opt/watchstate/.env
PHP_VERSION="8.5" PHP_FPM="YES" setup_php
setup_composer
NODE_VERSION="24" NODE_MODULE="bun" setup_nodejs
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "watchstate" "arabcoders/watchstate" "tarball" "latest" "/opt/watchstate" "" "v"
+1
View File
@@ -53,6 +53,7 @@ function update_script() {
create_backup /opt/webtrees/data
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="bcmath,gd,intl,xml,zip,pdo_mysql,mbstring,curl" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "webtrees" "fisharebest/webtrees" "prebuild" "latest" "/opt/webtrees" "webtrees-*.zip"
restore_backup
-1
View File
@@ -38,7 +38,6 @@ function update_script() {
create_backup /opt/yourls/user
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="mysql,mbstring,gd,xml,curl" setup_php
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "yourls" "YOURLS/YOURLS" "tarball"
restore_backup
-127
View File
@@ -1,127 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/dokuwiki/dokuwiki
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
var_admin_user="${var_admin_user:-admin}"
var_admin_user="${var_admin_user,,}"
if [[ ! "$var_admin_user" =~ ^[a-z0-9._-]+$ ]]; then
msg_warn "Invalid admin username '${var_admin_user}', using admin"
var_admin_user="admin"
fi
var_admin_pass="${var_admin_pass:-$(random_password 16)}"
msg_info "Installing Dependencies"
$STD apt install -y nginx
msg_ok "Installed Dependencies"
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
fetch_and_deploy_gh_release "dokuwiki" "dokuwiki/dokuwiki" "prebuild" "latest" "/opt/dokuwiki" "dokuwiki-*.tgz"
msg_info "Configuring DokuWiki"
mkdir -p /opt/dokuwiki_data
cat <<EOF >/opt/dokuwiki_data/.env
DOKUWIKI_ADMIN_USER=${var_admin_user}
DOKUWIKI_ADMIN_PASS=${var_admin_pass}
EOF
chmod 600 /opt/dokuwiki_data/.env
cat <<'EOF' >/opt/dokuwiki/conf/local.php
<?php
$conf['title'] = 'DokuWiki';
$conf['lang'] = 'en';
$conf['license'] = 'cc-by-sa';
$conf['useacl'] = 1;
$conf['superuser'] = '@admin';
$conf['disableactions'] = 'register';
$conf['userewrite'] = 1;
EOF
ADMIN_HASH=$(php -r 'echo password_hash($argv[1], PASSWORD_BCRYPT);' "$var_admin_pass")
cat <<EOF >/opt/dokuwiki/conf/users.auth.php
# users.auth.php
# <?php exit()?>
# Don't modify the lines above
#
# login:passwordhash:Real Name:email:groups,comma,separated
${var_admin_user}:${ADMIN_HASH}:Administrator:admin@localhost:admin,user
EOF
cat <<'EOF' >/opt/dokuwiki/conf/acl.auth.php
# acl.auth.php
# <?php exit()?>
# Don't modify the lines above
#
# none 0, read 1, edit 2, create 4, upload 8, delete 16
* @ALL 1
* @user 8
EOF
cat <<'EOF' >/opt/dokuwiki/conf/plugins.local.php
<?php
$plugins['authad'] = 0;
$plugins['authldap'] = 0;
EOF
rm -f /opt/dokuwiki/install.php
chown -R www-data:www-data /opt/dokuwiki
msg_ok "Configured DokuWiki"
msg_info "Configuring Nginx"
PHP_SOCK=$(get_php_fpm_socket)
cat <<EOF >/etc/nginx/sites-available/dokuwiki
server {
listen 80;
listen [::]:80;
server_name _;
root /opt/dokuwiki;
index doku.php;
client_max_body_size 128M;
server_tokens off;
fastcgi_hide_header X-Powered-By;
location ~ ^/(conf|bin|inc|vendor)/ {
deny all;
}
location ~ ^/data/ {
internal;
}
location ~ /\.|^/(install\.php|README|VERSION|COPYING|SECURITY\.md)\$ {
deny all;
}
location ~ ^/lib.*\.(js|css|gif|png|ico|jpg|jpeg|svg)\$ {
expires 365d;
}
location / {
try_files \$uri \$uri/ @dokuwiki;
}
location @dokuwiki {
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=\$1 last;
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=\$1 last;
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_\$1&id=\$2 last;
rewrite ^/(.*) /doku.php?id=\$1&\$args last;
}
location ~ \.php\$ {
try_files \$uri \$uri/ /doku.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
fastcgi_param REDIRECT_STATUS 200;
fastcgi_pass unix:${PHP_SOCK};
}
}
EOF
nginx_enable_site "dokuwiki"
msg_ok "Configured Nginx"
motd_ssh
customize
cleanup_lxc
+6 -9
View File
@@ -15,7 +15,8 @@ update_os
setup_deb_based() {
msg_info "Setup Garage"
download_file "https://garagehq.deuxfleurs.fr/_releases/${garage_release}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" /usr/local/bin/garage
GITEA_RELEASE=$(curl -s https://api.github.com/repos/deuxfleurs-org/garage/tags | jq -r '.[0].name')
curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" -o /usr/local/bin/garage
chmod +x /usr/local/bin/garage
mkdir -p /var/lib/garage/{data,meta,snapshots}
mkdir -p /etc/garage
@@ -28,7 +29,7 @@ RPC Secret: $RPC_SECRET
Admin Token: $ADMIN_TOKEN
Metrics Token: $METRICS_TOKEN
EOF
printf '%s\n' "$garage_release" >~/.garage
echo $GITEA_RELEASE >>~/.garage
cat <<EOF >/etc/garage.toml
metadata_dir = "/var/lib/garage/meta"
data_dir = "/var/lib/garage/data"
@@ -90,7 +91,8 @@ setup_alpine() {
$STD apk add --no-cache openssl
msg_ok "Installed Dependencies"
download_file "https://garagehq.deuxfleurs.fr/_releases/${garage_release}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" /usr/local/bin/garage
GITEA_RELEASE=$(curl -s https://api.github.com/repos/deuxfleurs-org/garage/tags | jq -r '.[0].name')
curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" -o /usr/local/bin/garage
chmod +x /usr/local/bin/garage
mkdir -p /var/lib/garage/{data,meta,snapshots}
mkdir -p /etc/garage
@@ -103,7 +105,7 @@ RPC Secret: $RPC_SECRET
Admin Token: $ADMIN_TOKEN
Metrics Token: $METRICS_TOKEN
EOF
printf '%s\n' "$garage_release" >~/.garage
echo $GITEA_RELEASE >>~/.garage
cat <<EOF >/etc/garage.toml
metadata_dir = "/var/lib/garage/meta"
data_dir = "/var/lib/garage/data"
@@ -153,11 +155,6 @@ EOF
msg_ok "Service active"
}
garage_release=$(curl -fsSL https://git.deuxfleurs.fr/api/v1/repos/Deuxfleurs/garage/releases/latest |
jq -er 'select(.draft == false and .prerelease == false) | .tag_name | strings | select(length > 0)') || {
msg_error "Could not determine the latest stable Garage release"
exit 1
}
run_os_setup
motd_ssh
+1 -1
View File
@@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
$STD apt install -y caddy
msg_ok "Installed Dependencies"
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULES="bcmath,gd,intl,xml,zip,pdo_pgsql,mbstring,curl,exif" setup_php
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="bcmath,gd,intl,xml,zip,pdo_pgsql,mbstring,curl,exif" setup_php
setup_composer
NODE_VERSION="24" NODE_MODULE="corepack,pnpm" setup_nodejs
PG_VERSION="16" setup_postgresql
+1 -1
View File
@@ -19,7 +19,7 @@ msg_ok "Installed Dependencies"
mkdir -p /opt/matomo
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULES="pdo_mysql,gd,mbstring,xml,curl,intl,zip,ldap" setup_php
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="pdo_mysql,gd,mbstring,xml,curl,intl,zip,ldap" setup_php
setup_mariadb
MARIADB_DB_NAME="matomo" MARIADB_DB_USER="matomo" setup_mariadb_db
+1 -1
View File
@@ -30,7 +30,7 @@ msg_ok "Installed Dependencies"
PG_VERSION="16" setup_postgresql
fetch_and_deploy_gh_release "mealie" "mealie-recipes/mealie" "tarball"
PYTHON_VERSION="3.14" UV_PROJECT_DIR="/opt/mealie" setup_uv
PYTHON_VERSION="3.12" UV_PROJECT_DIR="/opt/mealie" setup_uv
PG_DB_NAME="mealie_db" PG_DB_USER="mealie_user" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db
if [[ -f /opt/mealie/frontend/pnpm-lock.yaml ]]; then
+1 -1
View File
@@ -19,7 +19,7 @@ msg_ok "Installed Dependencies"
PG_VERSION="17" setup_postgresql
PG_DB_NAME="norish" PG_DB_USER="norish" setup_postgresql_db
PYTHON_VERSION="3.15" setup_uv
PYTHON_VERSION="3.14" setup_uv
fetch_and_deploy_gh_release "norish" "norish-recipes/norish" "tarball"
NODE_VERSION="26" NODE_MODULE="pnpm@$(jq -r '.packageManager | split("@")[1]' /opt/norish/package.json)" setup_nodejs
+1 -1
View File
@@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
$STD apt install -y nginx
msg_ok "Installed Dependencies"
PHP_VERSION="8.5" PHP_FPM="YES" setup_php
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
fetch_and_deploy_gh_release "poznote" "timothepoznanski/poznote" "tarball"
+1 -1
View File
@@ -162,7 +162,7 @@ else
fi
fetch_and_deploy_gh_release "romm" "rommapp/romm" "tarball"
PYTHON_VERSION="3.14" UV_PROJECT_DIR="/opt/romm" setup_uv
PYTHON_VERSION="3.13" UV_PROJECT_DIR="/opt/romm" setup_uv
echo "__version__ = \"$(cat ~/.romm)\"" >/opt/romm/backend/__version__.py
msg_info "Creating environment file"
+1 -1
View File
@@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
$STD apt install -y caddy
msg_ok "Installed Dependencies"
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULES="bcmath,gd,intl,xml,zip,pdo_pgsql,redis,mbstring,curl" setup_php
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="bcmath,gd,intl,xml,zip,pdo_pgsql,redis,mbstring,curl" setup_php
setup_composer
NODE_VERSION="22" setup_nodejs
PG_VERSION="16" setup_postgresql
+2 -2
View File
@@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
$STD apt install -y build-essential
msg_ok "Installed Dependencies"
PYTHON_VERSION="3.13" setup_uv
PYTHON_VERSION="3.12" setup_uv
NODE_VERSION="22" setup_nodejs
fetch_and_deploy_gh_release "suggestarr" "giuseppe99barchetta/SuggestArr" "tarball"
@@ -33,7 +33,7 @@ msg_ok "Built Frontend"
msg_info "Setting up Python Environment"
cd /opt/suggestarr
$STD uv venv --python 3.13 /opt/suggestarr/.venv
$STD uv venv --python 3.12 /opt/suggestarr/.venv
$STD uv pip install --python /opt/suggestarr/.venv -r /opt/suggestarr/api_service/requirements.txt
msg_ok "Set up Python Environment"
+1 -1
View File
@@ -33,7 +33,7 @@ msg_ok "Installed Dependencies"
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
fetch_and_deploy_gh_release "tandoor" "TandoorRecipes/recipes" "tarball" "latest" "/opt/tandoor"
PG_VERSION="17" setup_postgresql
PYTHON_VERSION="3.14" setup_uv
PYTHON_VERSION="3.13" setup_uv
PG_DB_USER="tandoor" PG_DB_NAME="db_recipes" PG_DB_EXTENSIONS="unaccent,pg_trgm" setup_postgresql_db
SECRET_KEY=$(openssl rand -base64 45 | sed 's/\//\\\//g')
+1 -1
View File
@@ -19,7 +19,7 @@ $STD apt install -y \
unzip
msg_ok "Installed Dependencies"
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULES="bcmath,gd,intl,xml,zip,pdo_mysql,mbstring,curl" setup_php
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="bcmath,gd,intl,xml,zip,pdo_mysql,mbstring,curl" setup_php
setup_mariadb
MARIADB_DB_NAME="webtrees" MARIADB_DB_USER="webtrees" setup_mariadb_db
$STD mariadb -u root -e "GRANT ALL ON \`webtrees\`.* TO 'webtrees'@'127.0.0.1' IDENTIFIED BY '${MARIADB_DB_PASS}'; FLUSH PRIVILEGES;"
+1 -1
View File
@@ -19,7 +19,7 @@ msg_ok "Installed Dependencies"
setup_mariadb
MARIADB_DB_NAME="yourls" MARIADB_DB_USER="yourls" setup_mariadb_db
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="mysql,mbstring,gd,xml,curl" setup_php
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="mysql,mbstring,gd,xml,curl" setup_php
fetch_and_deploy_gh_release "yourls" "YOURLS/YOURLS" "tarball"
-5
View File
@@ -161,11 +161,6 @@ if [ "${#failed_containers[@]}" -gt 0 ]; then
[ -s "$RUN_LOG" ] && echo -e "Their output: $RUN_LOG\n"
printf -v CS_ERROR_MSG '%s; ' "${failed_containers[@]}"
CS_ERROR_MSG="Cleaning failed in ${#failed_containers[@]} container(s): ${CS_ERROR_MSG%; }"
# One code shared by every failed container is the real one (100 is apt), not "1".
codes=$(printf '%s\n' "${failed_containers[@]}" | sed -n 's/^[^:]*: cleaning exited with \([0-9]*\).*/\1/p')
if [[ -n "$codes" && $(wc -l <<<"$codes") -eq ${#failed_containers[@]} && $(sort -u <<<"$codes" | wc -l) -eq 1 ]]; then
exit "$(head -n1 <<<"$codes")"
fi
exit 1
fi
echo -e "${GN} Finished, Selected Containers Cleaned. ${CL} \n"
+3 -10
View File
@@ -620,7 +620,6 @@ for container in $CHOICE; do
fi
#4) Update service, using the update command
pct exec "$container" -- touch /tmp/.cs-update-start 2>/dev/null || true
# Prepend a no-op 'clear' wrapper to PATH so update scripts calling clear
# don't fail without a TTY — works for all shells incl. ash (no export -f)
SETUP_CMD="mkdir -p /tmp/.nc; printf '#!/bin/sh\n:\n' > /tmp/.nc/clear; chmod +x /tmp/.nc/clear; export PATH=/tmp/.nc:\$PATH; export TERM=dumb; "
@@ -632,12 +631,6 @@ for container in $CHOICE; do
opensuse) pct exec "$container" -- bash -c "${SETUP_CMD}${UPDATE_CMD}" ;;
esac
exit_code=$?
# The engine in the container leaves what failed in an .errinfo file; without it
# the report says only "exit code: 1".
update_detail=""
if [ $exit_code -ne 0 ]; then
update_detail=$(pct exec "$container" -- sh -c 'f=$(find /root /tmp -maxdepth 1 -name "*.errinfo" -newer /tmp/.cs-update-start 2>/dev/null | head -n1); [ -n "$f" ] || exit 0; m=$(sed -n "s/^MESSAGE=//p" "$f" | head -n1); [ -n "$m" ] || m=$(sed -n "s/^COMMAND=//p" "$f" | head -n1); printf "%s" "$m" | head -c 200' 2>/dev/null || true)
fi
#5) if build resources are different than run resources, then:
if [ "$UPDATE_BUILD_RESOURCES" -eq "1" ]; then
@@ -672,7 +665,7 @@ for container in $CHOICE; do
log_result "$container" "$service" "SKIPPED" "Storage critically low on /boot (>80%)"
log_write "Container $container ($service): SKIPPED — storage critically low on /boot"
elif [ "$BACKUP_CHOICE" == "yes" ]; then
msg_error "Update failed for container $container ($service, exit code: $exit_code)${update_detail:+: $update_detail} — attempting restore"
msg_error "Update failed for container $container ($service, exit code: $exit_code) — attempting restore"
log_write "Container $container ($service): FAILED (exit $exit_code) — attempting restore"
msg_info "Restoring LXC $container from backup ($STORAGE_CHOICE)"
wait
@@ -710,8 +703,8 @@ for container in $CHOICE; do
exit 235
fi
else
msg_error "Update failed for container $container ($service, exit code: $exit_code)${update_detail:+: $update_detail}"
log_result "$container" "$service" "FAILED" "Exit code $exit_code${update_detail:+: $update_detail}"
msg_error "Update failed for container $container ($service, exit code: $exit_code)"
log_result "$container" "$service" "FAILED" "Exit code $exit_code"
log_write "Container $container ($service): FAILED (exit $exit_code)"
if [[ "$var_continue_on_error" == "yes" ]]; then
echo -e "${YW}[WARN]${CL} Continuing to next container (var_continue_on_error=yes)"
-5
View File
@@ -174,10 +174,5 @@ echo ""
if [ "${#failed_containers[@]}" -gt 0 ]; then
printf -v CS_ERROR_MSG '%s; ' "${failed_containers[@]}"
CS_ERROR_MSG="Update failed in ${#failed_containers[@]} container(s): ${CS_ERROR_MSG%; }"
# One code shared by every failed container is the real one (100 is apt), not "1".
codes=$(printf '%s\n' "${failed_containers[@]}" | sed -n 's/^[^:]*: update exited with \([0-9]*\).*/\1/p')
if [[ -n "$codes" && $(wc -l <<<"$codes") -eq ${#failed_containers[@]} && $(sort -u <<<"$codes" | wc -l) -eq 1 ]]; then
exit "$(head -n1 <<<"$codes")"
fi
exit 1
fi