Compare commits

..

7 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
d6439d40b8 refactor(php): remove redundant PHP_MODULE entries
- Add dom and gmp to BASE_MODULES in setup_php()
- Remove modules already covered by BASE_MODULES (cli,common,bcmath,curl,dom,gd,gmp,intl,mbstring,readline,xml,zip)
- Remove modules already covered by EXTENDED_MODULES (mysql,sqlite3,pgsql,redis,imagick,bz2,apcu)
- Remove modules already covered by BUILTIN (ctype,exif,ffi,fileinfo,gettext,iconv,pdo,tokenizer)
- Affected: 31 install scripts, 12 ct scripts
2026-01-30 12:14:29 +01:00
CanbiZ (MickLesk)
191301f953 immich: Quickfix MAINT_MODE unset variable handling in immich.sh
Use default value for MAINT_MODE to prevent errors when the variable is unset. This ensures the maintenance mode check works reliably.
2026-01-30 11:14:06 +01:00
community-scripts-pr-app[bot]
f58a97b9dd Update CHANGELOG.md (#11360)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-30 09:30:14 +00:00
CanbiZ (MickLesk)
710884c90b fix(php): improve module handling and prevent installation failures (#11358)
Changes to setup_php():
- Add version detection for PHP 8.5+ built-in opcache
- Define BUILTIN_MODULES list for modules included in php-common
  (ctype, fileinfo, iconv, tokenizer, phar, posix, etc.)
- Filter out built-in modules before attempting installation
- Verify each package exists via apt-cache before adding to install list
- Skip unavailable packages with informational message instead of error
- Add extended default modules (mysql, sqlite3, pgsql, redis, imagick,
  bz2, apcu) to cover ~90% of typical use cases
- Improve error handling with graceful degradation

This prevents installation failures when:
- PHP version has module built into core (e.g., opcache in 8.5+)
- Module is provided by php-common (ctype, fileinfo, etc.)
- Package is renamed or unavailable in specific PHP version

Fixes #11359
2026-01-30 10:29:51 +01:00
CanbiZ (MickLesk)
313faa02fe fix(meilisearch): fix dump creation and improve migration handling
Bug fixes:
- dumpUid is only available AFTER the dump task completes, not in the
  initial POST /dumps response. Fixed the extraction logic to wait for
  task completion first, then extract dumpUid from the task result.
- Removed non-existent API endpoint /dumps/{uid}/import - Meilisearch
  only supports dump import via CLI flag --import-dump

Improvements:
- If dump creation fails, backup the data directory before proceeding
  instead of just overwriting (allows manual recovery)
- Better error messages with actual API response content
- Proper health check loop during import with process monitoring
- Clear user guidance about what to do after failed migration

Fixes #11349
2026-01-30 10:29:08 +01:00
community-scripts-pr-app[bot]
06864f9e0b Update CHANGELOG.md (#11359)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-30 09:21:24 +00:00
CanbiZ (MickLesk)
49aa898edd fix(meilisearch): add data migration for version upgrades (#11356)
Meilisearch requires a dump/restore process when upgrading between
incompatible versions (different major.minor). The previous update
logic simply replaced the binary, causing database corruption.

This fix:
- Detects version changes that require migration
- Creates a data dump before upgrading
- Removes old incompatible data after binary update
- Imports the dump to restore data in new format
- Falls back to --import-dump CLI flag for older API versions
- Adds proper error handling and timeouts

Fixes #11349
2026-01-30 10:20:57 +01:00
44 changed files with 214 additions and 44 deletions

View File

@@ -393,6 +393,16 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
## 2026-01-30
### 💾 Core
- #### 🐞 Bug Fixes
- core: meilisearch - add data migration for version upgrades [@MickLesk](https://github.com/MickLesk) ([#11356](https://github.com/community-scripts/ProxmoxVE/pull/11356))
- #### ✨ New Features
- core: php - improve module handling and prevent installation failures [@MickLesk](https://github.com/MickLesk) ([#11358](https://github.com/community-scripts/ProxmoxVE/pull/11358))
## 2026-01-29
### 🆕 New Scripts

View File

@@ -41,7 +41,7 @@ function update_script() {
msg_ok "Backup Created"
if ! dpkg -l | grep -q 'php8.4'; then
PHP_VERSION="8.4" PHP_MODULE="common,ctype,fileinfo,mysql,cli,tokenizer,dom,redis,session,openssl" PHP_FPM="YES" setup_php
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
sed -i 's/php8\.[0-9]/php8.4/g' /etc/nginx/conf.d/2fauth.conf
fi
fetch_and_deploy_gh_release "2fauth" "Bubka/2FAuth" "tarball"

View File

@@ -37,7 +37,7 @@ function update_script() {
mv /opt/baikal /opt/baikal-backup
msg_ok "Backed up data"
PHP_APACHE="YES" PHP_MODULE="pgsql,curl" PHP_VERSION="8.3" setup_php
PHP_APACHE="YES" PHP_VERSION="8.3" setup_php
setup_composer
fetch_and_deploy_gh_release "baikal" "sabre-io/Baikal" "tarball"

View File

@@ -34,7 +34,7 @@ function update_script() {
systemctl stop nginx
msg_ok "Stopped nginx"
PHP_VERSION="8.4" PHP_FPM=YES PHP_MODULE="ffi,redis,pdo-sqlite" setup_php
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="pdo-sqlite" setup_php
msg_info "Backing up Bar Assistant"
mv /opt/bar-assistant /opt/bar-assistant-backup

View File

@@ -39,7 +39,7 @@ function update_script() {
msg_ok "Backup finished"
fetch_and_deploy_gh_release "bookstack" "BookStackApp/BookStack" "tarball"
PHP_MODULE="ldap,tidy,bz2,mysqli" PHP_FPM="YES" PHP_APACHE="YES" PHP_VERSION="8.3" setup_php
PHP_VERSION="8.3" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="ldap,tidy,mysqli" setup_php
setup_composer
msg_info "Restoring backup"

View File

@@ -29,7 +29,7 @@ function update_script() {
fi
php_ver=$(php -v | head -n 1 | awk '{print $2}')
if [[ ! $php_ver == "8.3"* ]]; then
PHP_VERSION="8.3" PHP_MODULE="sqlite3,bz2" PHP_APACHE="yes" setup_php
PHP_VERSION="8.3" PHP_APACHE="YES" setup_php
fi
if check_for_gh_release "grocy" "grocy/grocy"; then
msg_info "Updating grocy"

View File

@@ -250,7 +250,7 @@ EOF
ln -s "$GEO_DIR" "$APP_DIR"
chown -R immich:immich "$INSTALL_DIR"
if [[ "$MAINT_MODE" == 1 ]]; then
if [[ "${MAINT_MODE:-0}" == 1 ]]; then
msg_info "Disabling Maintenance Mode"
cd /opt/immich/app/bin
$STD bash ./immich-admin disable-maintenance-mode

View File

@@ -32,7 +32,7 @@ function update_script() {
fi
setup_mariadb
PHP_VERSION="8.4" PHP_MODULE="mysql" PHP_APACHE="YES" setup_php
PHP_VERSION="8.4" PHP_APACHE="YES" setup_php
setup_composer
if check_for_gh_release "kimai" "kimai/kimai"; then

View File

@@ -28,7 +28,7 @@ function update_script() {
msg_error "No ${APP} Installation Found!"
exit
fi
PHP_VERSION="8.3" PHP_MODULE="sqlite3" PHP_APACHE="YES" setup_php
PHP_VERSION="8.3" PHP_APACHE="YES" setup_php
msg_warn "LinkStack should be updated via the user interface."
exit
}

View File

@@ -31,7 +31,7 @@ function update_script() {
CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2)
if [[ "$CURRENT_PHP" != "8.3" ]]; then
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="mysql,redis" setup_php
PHP_VERSION="8.3" PHP_FPM="YES" setup_php
setup_composer
sed -i 's|php8\.2-fpm\.sock|php8.3-fpm.sock|g' /etc/nginx/sites-available/paymenter.conf
$STD systemctl reload nginx

View File

@@ -35,7 +35,7 @@ function update_script() {
if [[ "$CURRENT_PHP" != "8.4" ]]; then
msg_info "Migrating PHP $CURRENT_PHP to 8.4"
$STD apt remove -y php"${CURRENT_PHP//./}"*
PHP_VERSION="8.4" PHP_MODULE="mysql,sqlite3" PHP_APACHE="YES" PHP_FPM="YES" setup_php
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_FPM="YES" setup_php
msg_ok "Migrated PHP $CURRENT_PHP to 8.4"
fi

View File

@@ -36,7 +36,7 @@ function update_script() {
php_ver=$(php -v | head -n 1 | awk '{print $2}')
if [[ ! $php_ver == "8.4"* ]]; then
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_MODULE="pdo,mysql,gettext,fileinfo" setup_php
PHP_VERSION="8.4" PHP_APACHE="YES" setup_php
fi
mv /opt/projectsend/includes/sys.config.php /opt/sys.config.php

View File

@@ -42,7 +42,7 @@ function update_script() {
msg_ok "Created Backup"
fetch_and_deploy_gh_release "snipe-it" "grokability/snipe-it" "tarball"
[[ "$(php -v 2>/dev/null)" == PHP\ 8.2* ]] && PHP_VERSION="8.3" PHP_MODULE="common,ctype,ldap,fileinfo,iconv,mysql,soap,xsl" PHP_FPM="YES" setup_php
[[ "$(php -v 2>/dev/null)" == PHP\ 8.2* ]] && PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="ldap,soap,xsl" setup_php
sed -i 's/php8.2/php8.3/g' /etc/nginx/conf.d/snipeit.conf
setup_composer

View File

@@ -30,7 +30,7 @@ function update_script() {
fi
if check_for_gh_release "speedtest-tracker" "alexjustesen/speedtest-tracker"; then
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="common,sqlite3,redis" setup_php
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
setup_composer
NODE_VERSION="22" setup_nodejs
setcap cap_net_raw+ep /bin/ping

View File

@@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
$STD apt install -y nginx
msg_ok "Installed Dependencies"
PHP_VERSION="8.4" PHP_MODULE="common,ctype,fileinfo,mysql,tokenizer,dom,redis" PHP_FPM="YES" setup_php
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
setup_composer
setup_mariadb
MARIADB_DB_NAME="2fauth_db" MARIADB_DB_USER="2fauth" setup_mariadb_db

View File

@@ -18,7 +18,7 @@ $STD apt install -y git
msg_ok "Installed Dependencies"
PG_VERSION="16" setup_postgresql
PHP_APACHE="YES" PHP_MODULE="pgsql,curl" PHP_VERSION="8.3" setup_php
PHP_APACHE="YES" PHP_VERSION="8.3" setup_php
setup_composer
fetch_and_deploy_gh_release "baikal" "sabre-io/Baikal" "tarball"
PG_DB_NAME="baikal_db" PG_DB_USER="baikal_user" PG_DB_PASS="$(openssl rand -base64 12)" setup_postgresql_db

View File

@@ -23,7 +23,7 @@ $STD apt install -y \
libvips
msg_ok "Installed Dependencies"
PHP_VERSION="8.4" PHP_FPM=YES PHP_MODULE="ffi,redis,pdo-sqlite" setup_php
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="pdo-sqlite" setup_php
setup_composer
NODE_VERSION="22" setup_nodejs
setup_meilisearch

View File

@@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
$STD apt install -y make
msg_ok "Installed Dependencies"
PHP_MODULE="ldap,tidy,bz2,mysqli" PHP_FPM="YES" PHP_APACHE="YES" PHP_VERSION="8.3" setup_php
PHP_VERSION="8.3" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="ldap,tidy,mysqli" setup_php
setup_composer
setup_mariadb
MARIADB_DB_NAME="bookstack_db" MARIADB_DB_USER="bookstack_user" setup_mariadb_db

View File

@@ -26,7 +26,7 @@ $STD apt install -y --no-install-recommends \
pkg-config
msg_ok "Installed Dependencies"
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="mysql" setup_php
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_FPM="YES" setup_php
setup_composer
setup_mariadb
MARIADB_DB_NAME="domain_monitor" MARIADB_DB_USER="domainmonitor" setup_mariadb_db

View File

@@ -13,7 +13,7 @@ setting_up_container
network_check
update_os
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_MODULE="mysql" setup_php
PHP_VERSION="8.4" PHP_APACHE="YES" setup_php
setup_composer
setup_mariadb
MARIADB_DB_NAME="firefly" MARIADB_DB_USER="firefly" setup_mariadb_db

View File

@@ -13,7 +13,7 @@ setting_up_container
network_check
update_os
PHP_VERSION="8.4" PHP_MODULE="curl,common,xml,mbstring,intl,zip,pgsql,gmp" PHP_APACHE="YES" setup_php
PHP_VERSION="8.4" PHP_APACHE="YES" setup_php
PG_VERSION="16" setup_postgresql
PG_DB_NAME="freshrss" PG_DB_USER="freshrss_usr" setup_postgresql_db

View File

@@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
$STD apt install -y apt-transport-https
msg_ok "Installed Dependencies"
PHP_VERSION="8.3" PHP_MODULE="sqlite3,bz2" PHP_APACHE="yes" setup_php
PHP_VERSION="8.3" PHP_APACHE="YES" setup_php
fetch_and_deploy_gh_release "grocy" "grocy/grocy" "prebuild" "latest" "/var/www/html" "grocy*.zip"
msg_info "Configuring grocy"

View File

@@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
$STD apt install -y apt-transport-https
msg_ok "Installed Dependencies"
PHP_VERSION="8.4" PHP_MODULE="bz2,sqlite3" PHP_FPM="YES" setup_php
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
setup_composer
fetch_and_deploy_gh_release "Heimdall" "linuxserver/Heimdall" "tarball"

View File

@@ -15,7 +15,7 @@ update_os
setup_mariadb
MARIADB_DB_NAME="hortusfox" MARIADB_DB_USER="hortusfox" setup_mariadb_db
PHP_MODULE="exif,mysql" PHP_APACHE="YES" PHP_FPM="NO" PHP_VERSION="8.3" setup_php
PHP_VERSION="8.3" PHP_APACHE="YES" setup_php
setup_composer
fetch_and_deploy_gh_release "hortusfox" "danielbrendel/hortusfox-web" "tarball"

View File

@@ -28,7 +28,7 @@ $STD apt install -y \
msg_ok "Installed Dependencies"
export PHP_VERSION="8.4"
PHP_FPM=YES PHP_MODULE="gd,zip,intl,pdo,pgsql,pdo-pgsql,bcmath,opcache,mbstring,redis" setup_php
PHP_FPM="YES" PHP_MODULE="pdo-pgsql" setup_php
setup_composer
NODE_VERSION="22" setup_nodejs
PG_VERSION="17" setup_postgresql

View File

@@ -35,7 +35,7 @@ msg_ok "Installed Dependencies"
setup_mariadb
MARIADB_DB_NAME="invoiceninja" MARIADB_DB_USER="invoiceninja" setup_mariadb_db
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="bcmath,curl,gd,gmp,imagick,intl,mbstring,mysql,soap,xml,zip" setup_php
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="soap" setup_php
fetch_and_deploy_gh_release "invoiceninja" "invoiceninja/invoiceninja" "prebuild" "latest" "/opt/invoiceninja" "invoiceninja.tar.gz"

View File

@@ -22,7 +22,7 @@ $STD apt install -y \
msg_ok "Installed Dependencies"
setup_mariadb
PHP_VERSION="8.4" PHP_MODULE="mysql" PHP_APACHE="YES" setup_php
PHP_VERSION="8.4" PHP_APACHE="YES" setup_php
setup_composer
msg_info "Setting up database"

View File

@@ -23,7 +23,7 @@ msg_ok "Installed Dependencies"
PG_VERSION="16" setup_postgresql
PG_DB_NAME="koel" PG_DB_USER="koel" setup_postgresql_db
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="bz2,exif,imagick,pgsql,sqlite3" setup_php
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
setup_composer

View File

@@ -13,7 +13,7 @@ setting_up_container
network_check
update_os
PHP_VERSION="8.4" PHP_MODULE="mysql" PHP_APACHE="YES" PHP_FPM="YES" setup_php
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_FPM="YES" setup_php
setup_mariadb
MARIADB_DB_NAME="leantime" MARIADB_DB_USER="leantime" setup_mariadb_db
fetch_and_deploy_gh_release "leantime" "Leantime/leantime" "prebuild" "latest" "/opt/leantime" Leantime*.tar.gz

View File

@@ -38,7 +38,7 @@ $STD apt install -y \
python3-pip
msg_ok "Installed Python Dependencies"
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="gmp,mysql,snmp" setup_php
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="snmp" setup_php
setup_mariadb
setup_composer
PYTHON_VERSION="3.13" setup_uv

View File

@@ -13,7 +13,7 @@ setting_up_container
network_check
update_os
PHP_VERSION="8.3" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="imap,ldap,mysql" setup_php
PHP_VERSION="8.3" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="imap,ldap" setup_php
setup_mariadb
msg_info "Configuring MariaDB Database"

View File

@@ -13,7 +13,7 @@ setting_up_container
network_check
update_os
PHP_VERSION="8.3" PHP_MODULE="sqlite3" PHP_APACHE="YES" setup_php
PHP_VERSION="8.3" PHP_APACHE="YES" setup_php
fetch_and_deploy_gh_release "linkstack" "linkstackorg/linkstack" "prebuild" "latest" "/var/www/html/" "linkstack.zip"
msg_info "Configuring LinkStack"

View File

@@ -13,7 +13,7 @@ setting_up_container
network_check
update_os
PHP_VERSION="8.2" PHP_APACHE="YES" PHP_MODULE="dom,gmp,iconv,mysqli,pdo-mysql,redis,tokenizer" setup_php
PHP_VERSION="8.2" PHP_APACHE="YES" PHP_MODULE="mysqli,pdo-mysql" setup_php
setup_composer
setup_mariadb
MARIADB_DB_NAME="monica" MARIADB_DB_USER="monica" setup_mariadb_db

View File

@@ -16,7 +16,7 @@ update_os
NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs
PG_VERSION="16" setup_postgresql
PG_DB_NAME="partdb" PG_DB_USER="partdb" setup_postgresql_db
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_MODULE="xsl,pgsql" PHP_POST_MAX_SIZE="100M" PHP_UPLOAD_MAX_FILESIZE="100M" setup_php
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_MODULE="xsl" PHP_POST_MAX_SIZE="100M" PHP_UPLOAD_MAX_FILESIZE="100M" setup_php
setup_composer
msg_info "Installing Part-DB (Patience)"

View File

@@ -21,7 +21,7 @@ $STD apt install -y \
msg_ok "Installed Dependencies"
setup_mariadb
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="common,mysql,redis" setup_php
PHP_VERSION="8.3" PHP_FPM="YES" setup_php
setup_composer
fetch_and_deploy_gh_release "paymenter" "paymenter/paymenter" "prebuild" "latest" "/opt/paymenter" "paymenter.tar.gz"
chmod -R 755 /opt/paymenter/storage/* /opt/paymenter/bootstrap/cache/

View File

@@ -13,7 +13,7 @@ setting_up_container
network_check
update_os
PHP_VERSION="8.4" PHP_MODULE="mysql,sqlite3" PHP_APACHE="YES" PHP_FPM="YES" setup_php
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_FPM="YES" setup_php
setup_composer
setup_mariadb
MARIADB_DB_NAME="panel" MARIADB_DB_USER="pelican" setup_mariadb_db

View File

@@ -13,7 +13,7 @@ setting_up_container
network_check
update_os
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_MODULE="pdo,mysql,gettext,fileinfo" setup_php
PHP_VERSION="8.4" PHP_APACHE="YES" setup_php
setup_mariadb
MARIADB_DB_NAME="projectsend" MARIADB_DB_USER="projectsend" setup_mariadb_db
fetch_and_deploy_gh_release "projectsend" "projectsend/projectsend" "prebuild" "latest" "/opt/projectsend" "projectsend-r*.zip"

View File

@@ -19,7 +19,7 @@ $STD apt install -y \
nginx
msg_ok "Installed Dependencies"
PHP_VERSION="8.3" PHP_MODULE="common,ctype,ldap,fileinfo,iconv,mysql,soap,xsl" PHP_FPM="YES" setup_php
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="ldap,soap,xsl" setup_php
setup_composer
fetch_and_deploy_gh_release "snipe-it" "grokability/snipe-it" "tarball"
setup_mariadb

View File

@@ -20,7 +20,7 @@ $STD apt install -y \
setcap cap_net_raw+ep /bin/ping
msg_ok "Installed Dependencies"
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="common,sqlite3,redis" setup_php
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
setup_composer
NODE_VERSION="22" setup_nodejs
fetch_and_deploy_gh_release "speedtest-tracker" "alexjustesen/speedtest-tracker" "tarball"

View File

@@ -22,7 +22,7 @@ msg_ok "Installed Dependencies"
setup_mariadb
MARIADB_DB_NAME="wallabag" MARIADB_DB_USER="wallabag" setup_mariadb_db
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="bcmath,bz2,curl,gd,imagick,intl,mbstring,mysql,redis,tidy,xml,zip" setup_php
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="tidy" setup_php
setup_composer
NODE_VERSION="22" setup_nodejs
fetch_and_deploy_gh_release "wallabag" "wallabag/wallabag" "prebuild" "latest" "/opt/wallabag" "wallabag-*.tar.gz"

View File

@@ -14,7 +14,7 @@ setting_up_container
network_check
update_os
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_MODULE="imagick,bz2,sqlite3" setup_php
PHP_VERSION="8.4" PHP_APACHE="YES" setup_php
fetch_and_deploy_gh_release "wallos" "ellite/Wallos" "tarball"
msg_info "Installing Wallos (Patience)"

View File

@@ -13,7 +13,7 @@ setting_up_container
network_check
update_os
PHP_VERSION="8.4" PHP_MODULE="mysql" PHP_APACHE="YES" PHP_MAX_EXECUTION_TIME="600" setup_php
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_MAX_EXECUTION_TIME="600" setup_php
setup_mariadb
MARIADB_DB_NAME="wavelog" MARIADB_DB_USER="waveloguser" setup_mariadb_db
fetch_and_deploy_gh_release "wavelog" "wavelog/wavelog" "tarball"

View File

@@ -13,7 +13,7 @@ setting_up_container
network_check
update_os
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="common,snmp,imap,mysql" PHP_APACHE="YES" setup_php
PHP_VERSION="8.4" PHP_FPM="YES" PHP_APACHE="YES" PHP_MODULE="snmp,imap" setup_php
setup_mariadb
MARIADB_DB_NAME="wordpress_db" MARIADB_DB_USER="wordpress" setup_mariadb_db

View File

@@ -4512,7 +4512,7 @@ function setup_php() {
# Base modules - essential for most PHP applications
# Note: 'common' provides many built-in extensions
local BASE_MODULES="cli,common,bcmath,curl,gd,intl,mbstring,readline,xml,zip"
local BASE_MODULES="cli,common,bcmath,curl,dom,gd,gmp,intl,mbstring,readline,xml,zip"
# Add opcache only for PHP < 8.5 (it's built-in starting from 8.5)
if [[ "$PHP_MAJOR" -lt 8 ]] || [[ "$PHP_MAJOR" -eq 8 && "$PHP_MINOR" -lt 5 ]]; then
@@ -5259,9 +5259,169 @@ function setup_meilisearch() {
if [[ -f /usr/bin/meilisearch ]]; then
if check_for_gh_release "meilisearch" "meilisearch/meilisearch"; then
msg_info "Updating MeiliSearch"
# Get current and new version for compatibility check
local CURRENT_VERSION NEW_VERSION
CURRENT_VERSION=$(/usr/bin/meilisearch --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1) || CURRENT_VERSION="0.0.0"
NEW_VERSION="${CHECK_UPDATE_RELEASE#v}"
# Extract major.minor for comparison (Meilisearch requires dump/restore between minor versions)
local CURRENT_MAJOR_MINOR NEW_MAJOR_MINOR
CURRENT_MAJOR_MINOR=$(echo "$CURRENT_VERSION" | cut -d. -f1,2)
NEW_MAJOR_MINOR=$(echo "$NEW_VERSION" | cut -d. -f1,2)
# Determine if migration is needed (different major.minor = incompatible DB format)
local NEEDS_MIGRATION=false
if [[ "$CURRENT_MAJOR_MINOR" != "$NEW_MAJOR_MINOR" ]]; then
NEEDS_MIGRATION=true
msg_info "MeiliSearch version change detected (${CURRENT_VERSION}${NEW_VERSION}), preparing data migration"
fi
# Read config values for dump/restore
local MEILI_HOST MEILI_PORT MEILI_MASTER_KEY MEILI_DUMP_DIR
MEILI_HOST="${MEILISEARCH_HOST:-127.0.0.1}"
MEILI_PORT="${MEILISEARCH_PORT:-7700}"
MEILI_DUMP_DIR="${MEILISEARCH_DUMP_DIR:-/var/lib/meilisearch/dumps}"
MEILI_MASTER_KEY=$(grep -E "^master_key\s*=" /etc/meilisearch.toml 2>/dev/null | sed 's/.*=\s*"\(.*\)"/\1/' | tr -d ' ')
# Create dump before update if migration is needed
local DUMP_UID=""
if [[ "$NEEDS_MIGRATION" == "true" ]] && [[ -n "$MEILI_MASTER_KEY" ]]; then
msg_info "Creating MeiliSearch data dump before upgrade"
# Trigger dump creation
local DUMP_RESPONSE
DUMP_RESPONSE=$(curl -s -X POST "http://${MEILI_HOST}:${MEILI_PORT}/dumps" \
-H "Authorization: Bearer ${MEILI_MASTER_KEY}" \
-H "Content-Type: application/json" 2>/dev/null) || true
# The initial response only contains taskUid, not dumpUid
# dumpUid is only available after the task completes
local TASK_UID
TASK_UID=$(echo "$DUMP_RESPONSE" | grep -oP '"taskUid":\s*\K[0-9]+' || true)
if [[ -n "$TASK_UID" ]]; then
msg_info "Waiting for dump task ${TASK_UID} to complete..."
local MAX_WAIT=120
local WAITED=0
local TASK_RESULT=""
while [[ $WAITED -lt $MAX_WAIT ]]; do
TASK_RESULT=$(curl -s "http://${MEILI_HOST}:${MEILI_PORT}/tasks/${TASK_UID}" \
-H "Authorization: Bearer ${MEILI_MASTER_KEY}" 2>/dev/null) || true
local TASK_STATUS
TASK_STATUS=$(echo "$TASK_RESULT" | grep -oP '"status":\s*"\K[^"]+' || true)
if [[ "$TASK_STATUS" == "succeeded" ]]; then
# Extract dumpUid from the completed task details
DUMP_UID=$(echo "$TASK_RESULT" | grep -oP '"dumpUid":\s*"\K[^"]+' || true)
if [[ -n "$DUMP_UID" ]]; then
msg_ok "MeiliSearch dump created successfully: ${DUMP_UID}"
else
msg_warn "Dump task succeeded but could not extract dumpUid"
fi
break
elif [[ "$TASK_STATUS" == "failed" ]]; then
local ERROR_MSG
ERROR_MSG=$(echo "$TASK_RESULT" | grep -oP '"message":\s*"\K[^"]+' || echo "Unknown error")
msg_warn "MeiliSearch dump failed: ${ERROR_MSG}"
break
fi
sleep 2
WAITED=$((WAITED + 2))
done
if [[ $WAITED -ge $MAX_WAIT ]]; then
msg_warn "MeiliSearch dump timed out after ${MAX_WAIT}s"
fi
else
msg_warn "Could not trigger MeiliSearch dump (no taskUid in response)"
msg_info "Response was: ${DUMP_RESPONSE:-empty}"
fi
fi
# If migration is needed but dump failed, we have options:
# 1. Abort the update (safest, but annoying)
# 2. Backup data directory and proceed (allows manual recovery)
# 3. Just proceed and hope for the best (dangerous)
# We choose option 2: backup and proceed with warning
if [[ "$NEEDS_MIGRATION" == "true" ]] && [[ -z "$DUMP_UID" ]]; then
local MEILI_DB_PATH
MEILI_DB_PATH=$(grep -E "^db_path\s*=" /etc/meilisearch.toml 2>/dev/null | sed 's/.*=\s*"\(.*\)"/\1/' | tr -d ' ')
MEILI_DB_PATH="${MEILI_DB_PATH:-/var/lib/meilisearch/data}"
if [[ -d "$MEILI_DB_PATH" ]] && [[ -n "$(ls -A "$MEILI_DB_PATH" 2>/dev/null)" ]]; then
local BACKUP_PATH="${MEILI_DB_PATH}.backup.$(date +%Y%m%d%H%M%S)"
msg_warn "Backing up MeiliSearch data to ${BACKUP_PATH}"
mv "$MEILI_DB_PATH" "$BACKUP_PATH"
mkdir -p "$MEILI_DB_PATH"
msg_info "Data backed up. After update, you may need to reindex your data."
msg_info "Old data is preserved at: ${BACKUP_PATH}"
fi
fi
# Stop service and update binary
systemctl stop meilisearch
fetch_and_deploy_gh_release "meilisearch" "meilisearch/meilisearch" "binary"
systemctl start meilisearch
# If migration needed and dump was created, remove old data and import dump
if [[ "$NEEDS_MIGRATION" == "true" ]] && [[ -n "$DUMP_UID" ]]; then
local MEILI_DB_PATH
MEILI_DB_PATH=$(grep -E "^db_path\s*=" /etc/meilisearch.toml 2>/dev/null | sed 's/.*=\s*"\(.*\)"/\1/' | tr -d ' ')
MEILI_DB_PATH="${MEILI_DB_PATH:-/var/lib/meilisearch/data}"
msg_info "Removing old MeiliSearch database for migration"
rm -rf "${MEILI_DB_PATH:?}"/*
# Import dump using CLI flag (this is the supported method)
local DUMP_FILE="${MEILI_DUMP_DIR}/${DUMP_UID}.dump"
if [[ -f "$DUMP_FILE" ]]; then
msg_info "Importing dump: ${DUMP_FILE}"
# Start meilisearch with --import-dump flag
# This is a one-time import that happens during startup
/usr/bin/meilisearch --config-file-path /etc/meilisearch.toml --import-dump "$DUMP_FILE" &
local MEILI_PID=$!
# Wait for meilisearch to become healthy (import happens during startup)
msg_info "Waiting for MeiliSearch to import and start..."
local MAX_WAIT=300
local WAITED=0
while [[ $WAITED -lt $MAX_WAIT ]]; do
if curl -sf "http://${MEILI_HOST}:${MEILI_PORT}/health" &>/dev/null; then
msg_ok "MeiliSearch is healthy after import"
break
fi
# Check if process is still running
if ! kill -0 $MEILI_PID 2>/dev/null; then
msg_warn "MeiliSearch process exited during import"
break
fi
sleep 3
WAITED=$((WAITED + 3))
done
# Stop the manual process
kill $MEILI_PID 2>/dev/null || true
sleep 2
# Start via systemd for proper management
systemctl start meilisearch
if systemctl is-active --quiet meilisearch; then
msg_ok "MeiliSearch migrated successfully"
else
msg_warn "MeiliSearch failed to start after migration - check logs with: journalctl -u meilisearch"
fi
else
msg_warn "Dump file not found: ${DUMP_FILE}"
systemctl start meilisearch
fi
else
systemctl start meilisearch
fi
msg_ok "Updated MeiliSearch"
fi
return 0