mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-20 21:08:27 +01:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a73bd472cf | ||
|
|
0fa31b30b6 | ||
|
|
01e23a0c50 | ||
|
|
33d5dec459 | ||
|
|
0116d934aa |
No files matched your search
@@ -584,6 +584,18 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-11-20
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Stalwart: migrate to v1 with stalwart-migrate [@MickLesk](https://github.com/MickLesk) ([#18794](https://github.com/community-scripts/ProxmoxVE/pull/18794))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- fix: vm - name why an image step failed and open one message for the disk import [@MickLesk](https://github.com/MickLesk) ([core#279](https://github.com/community-scripts/core/pull/279))
|
||||
|
||||
## 2026-11-19
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
@@ -68,7 +68,10 @@ function update_script() {
|
||||
|
||||
msg_info "Patching nginx HTTP/2 (CVE-2026-123007, CVE-2026-123633)"
|
||||
for commit in 61031503dc8087c2c17cd2142c9b4b19062f90c4 2df48a501d0fb8212b7d39dffeeff5876332ba59 e27f5fa84fe6e98505e70bc543b748747dad0a3b; do
|
||||
curl_with_retry "https://github.com/nginx/nginx/commit/${commit}.patch" "-" | patch -d /opt/openresty/bundle/nginx-1.31.8 -p1 --forward -s
|
||||
curl_with_retry "https://api.github.com/repos/nginx/nginx/commits/${commit}" "/tmp/nginx-${commit}.patch" "-HAccept:application/vnd.github.patch" ||
|
||||
curl_with_retry "https://github.com/nginx/nginx/commit/${commit}.patch" "/tmp/nginx-${commit}.patch"
|
||||
patch -d /opt/openresty/bundle/nginx-1.31.8 -p1 --forward -s <"/tmp/nginx-${commit}.patch"
|
||||
rm -f "/tmp/nginx-${commit}.patch"
|
||||
done
|
||||
msg_ok "Patched nginx HTTP/2"
|
||||
|
||||
|
||||
+64
-3
@@ -31,13 +31,74 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE="v0.16.27"
|
||||
if check_for_gh_release "stalwart" "stalwartlabs/stalwart" "${RELEASE}" "Stalwart v1 changes the data store layout and requires an offline migration with stalwartlabs/stalwart-migrate; pinned until this script supports it"; then
|
||||
if [[ "$(cat ~/.stalwart 2>/dev/null)" == 0.* ]]; then
|
||||
if check_for_gh_release "stalwart" "stalwartlabs/stalwart" "v0.16.27" "v1 needs the migration below"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop stalwart
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "stalwart" "stalwartlabs/stalwart" "prebuild" "v0.16.27" "/opt/stalwart" "stalwart-$(arch_resolve x86_64 aarch64)-unknown-linux-gnu.tar.gz"
|
||||
chmod +x /opt/stalwart/stalwart
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start stalwart
|
||||
msg_ok "Started Service"
|
||||
fi
|
||||
|
||||
CONFIG_DIR="/opt/stalwart_data/etc"
|
||||
if [[ ! -t 0 ]]; then
|
||||
msg_warn "Stalwart v1 needs a migration that asks questions. Run update from the container console."
|
||||
exit
|
||||
fi
|
||||
if ! grep -q '"@type":"RocksDb"' "${CONFIG_DIR}/config.json"; then
|
||||
msg_error "This script migrates only the default RocksDB store to Stalwart v1. Migrate manually: https://stalw.art/docs/migration/upgrade-0-16/"
|
||||
exit 1
|
||||
fi
|
||||
SOURCE_PATH=$(grep -oP '"path":"\K[^"]+' "${CONFIG_DIR}/config.json")
|
||||
TARGET_PATH="${SOURCE_PATH%/}-v1/"
|
||||
DATA_KB=$(du -sk "$SOURCE_PATH" | cut -f1)
|
||||
FREE_KB=$(df -Pk "$(dirname "${SOURCE_PATH%/}")" | awk 'NR==2 {print $4}')
|
||||
if ((FREE_KB < DATA_KB * 11 / 10 + 524288)); then
|
||||
msg_error "The migration copies the data store ($((DATA_KB / 1024)) MB) but only $((FREE_KB / 1024)) MB are free. Resize the container disk and run update again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fetch_and_deploy_gh_release "stalwart-migrate" "stalwartlabs/stalwart-migrate" "prebuild" "latest" "/opt/stalwart-migrate" "stalwart-migrate-$(arch_resolve x86_64 aarch64)-unknown-linux-gnu.tar.xz"
|
||||
echo "{\"@type\":\"RocksDb\",\"path\":\"${TARGET_PATH}\"}" >"${CONFIG_DIR}/config-v1.json"
|
||||
|
||||
msg_warn "Stalwart v1 cannot open the v0.16 data store, so it is copied to ${TARGET_PATH}. Mail is down while the copy runs."
|
||||
echo -e "${TAB}Press Enter to accept the recommended answers."
|
||||
/opt/stalwart-migrate/stalwart-migrate prepare --source "${CONFIG_DIR}/config.json" --state /opt/stalwart_data/migrate
|
||||
|
||||
msg_info "Copying data to the v1 store"
|
||||
systemctl stop stalwart
|
||||
if ! $STD /opt/stalwart-migrate/stalwart-migrate run --final --yes --source "${CONFIG_DIR}/config.json" --target "${CONFIG_DIR}/config-v1.json" --state /opt/stalwart_data/migrate; then
|
||||
systemctl start stalwart
|
||||
msg_error "Migration failed, Stalwart v0.16 is running again. Logs: /opt/stalwart_data/migrate/logs"
|
||||
exit 1
|
||||
fi
|
||||
msg_ok "Copied data to the v1 store"
|
||||
|
||||
mv "${CONFIG_DIR}/config.json" "${CONFIG_DIR}/config-0.16.json"
|
||||
mv "${CONFIG_DIR}/config-v1.json" "${CONFIG_DIR}/config.json"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "stalwart" "stalwartlabs/stalwart" "prebuild" "latest" "/opt/stalwart" "stalwart-$(arch_resolve x86_64 aarch64)-unknown-linux-gnu.tar.gz"
|
||||
chmod +x /opt/stalwart/stalwart
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start stalwart
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Migrated to Stalwart $(cat ~/.stalwart)"
|
||||
msg_warn "OAuth clients have to sign in again. Search results stay incomplete until v1 has rebuilt the index."
|
||||
msg_warn "The v0.16 store stays in ${SOURCE_PATH} (${CONFIG_DIR}/config-0.16.json). Delete it once v1 works."
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "stalwart" "stalwartlabs/stalwart"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop stalwart
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "stalwart" "stalwartlabs/stalwart" "prebuild" "${RELEASE}" "/opt/stalwart" "stalwart-$(arch_resolve x86_64 aarch64)-unknown-linux-gnu.tar.gz"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "stalwart" "stalwartlabs/stalwart" "prebuild" "latest" "/opt/stalwart" "stalwart-$(arch_resolve x86_64 aarch64)-unknown-linux-gnu.tar.gz"
|
||||
chmod +x /opt/stalwart/stalwart
|
||||
|
||||
msg_info "Starting Service"
|
||||
|
||||
@@ -42,7 +42,10 @@ fetch_and_deploy_from_url "https://openresty.org/download/openresty-${OPENRESTY_
|
||||
|
||||
msg_info "Patching nginx HTTP/2 (CVE-2026-123007, CVE-2026-123633)"
|
||||
for commit in 61031503dc8087c2c17cd2142c9b4b19062f90c4 2df48a501d0fb8212b7d39dffeeff5876332ba59 e27f5fa84fe6e98505e70bc543b748747dad0a3b; do
|
||||
curl_with_retry "https://github.com/nginx/nginx/commit/${commit}.patch" "-" | patch -d /opt/openresty/bundle/nginx-1.31.8 -p1 --forward -s
|
||||
curl_with_retry "https://api.github.com/repos/nginx/nginx/commits/${commit}" "/tmp/nginx-${commit}.patch" "-HAccept:application/vnd.github.patch" ||
|
||||
curl_with_retry "https://github.com/nginx/nginx/commit/${commit}.patch" "/tmp/nginx-${commit}.patch"
|
||||
patch -d /opt/openresty/bundle/nginx-1.31.8 -p1 --forward -s <"/tmp/nginx-${commit}.patch"
|
||||
rm -f "/tmp/nginx-${commit}.patch"
|
||||
done
|
||||
msg_ok "Patched nginx HTTP/2"
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
fetch_and_deploy_gh_release "stalwart" "stalwartlabs/stalwart" "prebuild" "v0.16.27" "/opt/stalwart" "stalwart-$(arch_resolve x86_64 aarch64)-unknown-linux-gnu.tar.gz"
|
||||
fetch_and_deploy_gh_release "stalwart" "stalwartlabs/stalwart" "prebuild" "latest" "/opt/stalwart" "stalwart-$(arch_resolve x86_64 aarch64)-unknown-linux-gnu.tar.gz"
|
||||
chmod +x /opt/stalwart/stalwart
|
||||
|
||||
msg_info "Configuring Stalwart"
|
||||
|
||||
Reference in new issue
Block a user