Compare commits

...

27 Commits

Author SHA1 Message Date
community-scripts-pr-app[bot]
129e9a062e Update CHANGELOG.md (#11385)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-31 00:20:05 +00:00
community-scripts-pr-app[bot]
de854c8176 chore: update github-versions.json (#11384)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-31 00:19:42 +00:00
community-scripts-pr-app[bot]
2be74265d1 Update .app files (#11382)
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2026-01-31 00:20:15 +01:00
community-scripts-pr-app[bot]
f518fafd0b Update CHANGELOG.md (#11383)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-30 23:11:23 +00:00
community-scripts-pr-app[bot]
e49285c428 Update CHANGELOG.md (#11381)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-30 23:11:03 +00:00
community-scripts-pr-app[bot]
ca5535e39f Update date in json (#11380)
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2026-01-30 23:10:55 +00:00
push-app-to-main[bot]
539785678c languagetool (#11370)
* Add languagetool (ct)

* Apply suggestion from @tremor021

* Apply suggestion from @tremor021

* Apply suggestion from @tremor021

* Apply suggestion from @tremor021

* Apply suggestion from @tremor021

* Update languagetool.sh

---------

Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
2026-01-31 00:10:38 +01:00
community-scripts-pr-app[bot]
2d72af3d1d Update .app files (#11378)
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2026-01-30 23:50:44 +01:00
community-scripts-pr-app[bot]
03af9de653 Update CHANGELOG.md (#11379)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-30 22:49:20 +00:00
push-app-to-main[bot]
398a5d2e34 Ampache (#11369)
* Add ampache (ct)

* less msg blocks

* Update ampache.json

* Update ampache-install.sh

* typo

* Fix PHP_VERSION and MARIADB_DB_USER syntax

* Update install/ampache-install.sh

Co-authored-by: Chris <punk.sand7393@fastmail.com>

* Update install/ampache-install.sh

Co-authored-by: Chris <punk.sand7393@fastmail.com>

---------

Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com>
Co-authored-by: Chris <punk.sand7393@fastmail.com>
2026-01-30 23:48:51 +01:00
community-scripts-pr-app[bot]
4a78070560 Update CHANGELOG.md (#11377)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-30 21:26:16 +00:00
Slaviša Arežina
f09f723a33 Add fetch_and_deploy_from_url (#11376) 2026-01-30 22:25:55 +01:00
community-scripts-pr-app[bot]
8ced103419 chore: update github-versions.json (#11373)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-30 18:12:20 +00:00
CanbiZ (MickLesk)
0fc4e6ed10 fix(koillection): add export APP_RUNTIME for composer post-install scripts 2026-01-30 14:27:29 +01:00
CanbiZ (MickLesk)
3fc0b29d88 fix(koillection): override FrankenPHP runtime with Symfony runtime
Koillection 1.8.0 configures FrankenPHP runtime in composer.json extra,
but we use Apache. Fix by:
- Adding APP_RUNTIME to .env.local for CLI commands
- Adding SetEnv APP_RUNTIME in Apache VirtualHost for web requests
- Creating uploads directory before chown
- Update script checks and adds runtime config for upgrades
2026-01-30 13:53:20 +01:00
CanbiZ (MickLesk)
80cba8d29d fix chown 2026-01-30 13:31:00 +01:00
community-scripts-pr-app[bot]
d10b69f8af chore: update github-versions.json (#11365)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-30 12:10:48 +00:00
community-scripts-pr-app[bot]
5ef2c86402 Update CHANGELOG.md (#11364)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-30 12:05:29 +00:00
community-scripts-pr-app[bot]
fef80c7e28 Update CHANGELOG.md (#11363)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-30 12:05:09 +00:00
CanbiZ (MickLesk)
90eb33c09e refactor(php): remove redundant PHP_MODULE entries (#11362)
- 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 13:05:05 +01:00
CanbiZ (MickLesk)
c5e4b1a210 Refactor: Koillection (#11361) 2026-01-30 13:04:42 +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
55 changed files with 944 additions and 119 deletions

View File

@@ -391,8 +391,33 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-01-31
## 2026-01-30
### 🆕 New Scripts
- languagetool ([#11370](https://github.com/community-scripts/ProxmoxVE/pull/11370))
- Ampache ([#11369](https://github.com/community-scripts/ProxmoxVE/pull/11369))
### 🚀 Updated Scripts
- #### 🔧 Refactor
- Refactor: remove redundant PHP_MODULE entries in several scripts [@MickLesk](https://github.com/MickLesk) ([#11362](https://github.com/community-scripts/ProxmoxVE/pull/11362))
- Refactor: Koillection [@MickLesk](https://github.com/MickLesk) ([#11361](https://github.com/community-scripts/ProxmoxVE/pull/11361))
### 💾 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
- [tools] Add `fetch_and_deploy_from_url()` [@tremor021](https://github.com/tremor021) ([#11376](https://github.com/community-scripts/ProxmoxVE/pull/11376))
- 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"

71
ct/ampache.sh Normal file
View File

@@ -0,0 +1,71 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/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/ampache/ampache
APP="Ampache"
var_tags="${var_tags:-music}"
var_disk="${var_disk:-5}"
var_cpu="${var_cpu:-4}"
var_ram="${var_ram:-2048}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/ampache ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "Ampache" "ampache/ampache"; then
msg_info "Stopping Service"
systemctl stop apache2
msg_ok "Stopped Service"
msg_info "Creating Backup"
cp /opt/ampache/config/ampache.cfg.php /tmp/ampache.cfg.php.backup
cp /opt/ampache/public/rest/.htaccess /tmp/ampache_rest.htaccess.backup
cp /opt/ampache/public/play/.htaccess /tmp/ampache_play.htaccess.backup
rm -rf /opt/ampache_backup
mv /opt/ampache /opt/ampache_backup
msg_ok "Created Backup"
fetch_and_deploy_gh_release "Ampache" "ampache/ampache" "prebuild" "latest" "/opt/ampache" "ampache-*_all_php8.4.zip"
msg_info "Restoring Backup"
cp /tmp/ampache.cfg.php.backup /opt/ampache/config/ampache.cfg.php
cp /tmp/ampache_rest.htaccess.backup /opt/ampache/public/rest/.htaccess
cp /tmp/ampache_play.htaccess.backup /opt/ampache/public/play/.htaccess
chmod 664 /opt/ampache/public/rest/.htaccess /opt/ampache/public/play/.htaccess
chown -R www-data:www-data /opt/ampache
rm -f /tmp/ampache*.backup
msg_ok "Restored Configuration"
msg_info "Starting Service"
systemctl start apache2
msg_ok "Started Service"
msg_ok "Updated successfully!"
msg_custom "⚠️" "${YW}" "Complete database update by visiting: http://${LOCAL_IP}/update.php"
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 "${TAB}${GATEWAY}${BGN}http://${IP}/install.php${CL}"

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"

6
ct/headers/ampache Normal file
View File

@@ -0,0 +1,6 @@
___ __
/ | ____ ___ ____ ____ ______/ /_ ___
/ /| | / __ `__ \/ __ \/ __ `/ ___/ __ \/ _ \
/ ___ |/ / / / / / /_/ / /_/ / /__/ / / / __/
/_/ |_/_/ /_/ /_/ .___/\__,_/\___/_/ /_/\___/
/_/

6
ct/headers/languagetool Normal file
View File

@@ -0,0 +1,6 @@
__ ______ __
/ / ____ _____ ____ ___ ______ _____ ____/_ __/___ ____ / /
/ / / __ `/ __ \/ __ `/ / / / __ `/ __ `/ _ \/ / / __ \/ __ \/ /
/ /___/ /_/ / / / / /_/ / /_/ / /_/ / /_/ / __/ / / /_/ / /_/ / /
/_____/\__,_/_/ /_/\__, /\__,_/\__,_/\__, /\___/_/ \____/\____/_/
/____/ /____/

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

@@ -31,8 +31,8 @@ function update_script() {
msg_info "Stopping Service"
systemctl stop apache2
msg_ok "Stopped Service"
PHP_VERSION="8.5" PHP_APACHE="YES" PHP_MODULE="apcu,ctype,dom,fileinfo,iconv,pgsql" setup_php
PHP_VERSION="8.5" PHP_APACHE="YES" setup_php
msg_info "Creating a backup"
mv /opt/koillection/ /opt/koillection-backup
@@ -44,15 +44,28 @@ function update_script() {
cd /opt/koillection
cp -r /opt/koillection-backup/.env.local /opt/koillection
cp -r /opt/koillection-backup/public/uploads/. /opt/koillection/public/uploads/
# Ensure APP_RUNTIME is in .env.local for CLI commands (upgrades from older versions)
if ! grep -q "APP_RUNTIME" /opt/koillection/.env.local 2>/dev/null; then
echo 'APP_RUNTIME="Symfony\Component\Runtime\SymfonyRuntime"' >> /opt/koillection/.env.local
fi
export COMPOSER_ALLOW_SUPERUSER=1
export APP_RUNTIME='Symfony\Component\Runtime\SymfonyRuntime'
$STD composer install --no-dev -o --no-interaction --classmap-authoritative
$STD php bin/console doctrine:migrations:migrate --no-interaction
$STD php bin/console app:translations:dump
cd assets/
$STD yarn install
$STD yarn build
mkdir -p /opt/koillection/public/uploads
chown -R www-data:www-data /opt/koillection/public/uploads
rm -r /opt/koillection-backup
# Ensure APP_RUNTIME is set in Apache config (for upgrades from older versions)
if ! grep -q "APP_RUNTIME" /etc/apache2/sites-available/koillection.conf 2>/dev/null; then
sed -i '/<VirtualHost/a\ SetEnv APP_RUNTIME "Symfony\\Component\\Runtime\\SymfonyRuntime"' /etc/apache2/sites-available/koillection.conf
fi
msg_ok "Updated Koillection"
msg_info "Starting Service"

68
ct/languagetool.sh Normal file
View File

@@ -0,0 +1,68 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://languagetool.org/
APP="LanguageTool"
var_tags="${var_tags:-spellcheck}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-16}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/LanguageTool ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
RELEASE=$(curl -fsSL https://languagetool.org/download/ | grep -oP 'LanguageTool-\K[0-9]+\.[0-9]+(\.[0-9]+)?(?=\.zip)' | sort -V | tail -n1)
if [[ "${RELEASE}" != "$(cat ~/.languagetool 2>/dev/null)" ]] || [[ ! -f ~/.languagetool ]]; then
msg_info "Stopping Service"
systemctl stop language-tool
msg_ok "Stopped Service"
msg_info "Creating Backup"
cp /opt/LanguageTool/server.properties /opt/server.properties
msg_ok "Created Backup"
msg_info "Updating LanguageTool"
rm -rf /opt/LanguageTool
download_file "https://languagetool.org/download/LanguageTool-stable.zip" /tmp/LanguageTool-stable.zip
unzip -q /tmp/LanguageTool-stable.zip -d /opt
mv /opt/LanguageTool-*/ /opt/LanguageTool/
mv /opt/server.properties /opt/LanguageTool/server.properties
rm -f /tmp/LanguageTool-stable.zip
echo "${RELEASE}" >~/.languagetool
msg_ok "Updated LanguageTool"
msg_info "Starting Service"
systemctl start language-tool
msg_ok "Started Service"
msg_ok "Updated successfuly!"
else
msg_ok "No update required. ${APP} is already at v${RELEASE}"
fi
exit
}
start
build_container
description
msg_ok "Completed successfully!"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8081/v2${CL}"

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

@@ -0,0 +1,48 @@
{
"name": "Ampache",
"slug": "ampache",
"categories": [
13
],
"date_created": "2026-01-30",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 80,
"documentation": "https://github.com/ampache/ampache/wiki",
"website": "https://ampache.org/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/ampache.webp",
"config_path": "/opt/ampache/config/ampache.cfg.php",
"description": "Ampache is a web-based audio streaming application and file manager that allows you to access your music & videos from anywhere. It features a powerful music catalog, multiple user support, transcoding, streaming, and more.",
"install_methods": [
{
"type": "default",
"script": "ct/ampache.sh",
"resources": {
"cpu": 4,
"ram": 2048,
"hdd": 5,
"os": "debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "Complete the web-based setup at http://IP/install.php",
"type": "info"
},
{
"text": "Database credentials are stored in `~/ampache.creds` - use only the MySQL username and password from this file",
"type": "info"
},
{
"text": "During installation, only check 'Create Tables' - leave 'Create Database' and 'Create Database User' unchecked",
"type": "info"
}
]
}

View File

@@ -1,5 +1,5 @@
{
"generated": "2026-01-30T06:16:23Z",
"generated": "2026-01-31T00:19:35Z",
"versions": [
{
"slug": "2fauth",
@@ -29,6 +29,13 @@
"pinned": false,
"date": "2025-03-20T03:06:11Z"
},
{
"slug": "ampache",
"repo": "ampache/ampache",
"version": "7.8.0",
"pinned": false,
"date": "2025-12-22T04:23:45Z"
},
{
"slug": "argus",
"repo": "release-argus/Argus",
@@ -53,9 +60,9 @@
{
"slug": "autobrr",
"repo": "autobrr/autobrr",
"version": "v1.72.0",
"version": "v1.72.1",
"pinned": false,
"date": "2026-01-27T20:53:54Z"
"date": "2026-01-30T12:57:58Z"
},
{
"slug": "autocaliweb",
@@ -235,9 +242,9 @@
{
"slug": "discopanel",
"repo": "nickheyer/discopanel",
"version": "v1.0.29",
"version": "v1.0.31",
"pinned": false,
"date": "2026-01-30T04:58:19Z"
"date": "2026-01-30T18:30:38Z"
},
{
"slug": "dispatcharr",
@@ -368,9 +375,9 @@
{
"slug": "ghostfolio",
"repo": "ghostfolio/ghostfolio",
"version": "2.233.0",
"version": "2.234.0",
"pinned": false,
"date": "2026-01-23T18:41:45Z"
"date": "2026-01-30T19:00:22Z"
},
{
"slug": "gitea",
@@ -403,9 +410,9 @@
{
"slug": "gokapi",
"repo": "Forceu/Gokapi",
"version": "v2.2.0",
"version": "v2.2.1",
"pinned": false,
"date": "2026-01-28T23:59:22Z"
"date": "2026-01-30T10:26:26Z"
},
{
"slug": "gotify",
@@ -473,16 +480,16 @@
{
"slug": "homarr",
"repo": "homarr-labs/homarr",
"version": "v1.51.0",
"version": "v1.52.0",
"pinned": false,
"date": "2026-01-23T19:29:49Z"
"date": "2026-01-30T19:41:22Z"
},
{
"slug": "homebox",
"repo": "sysadminsmedia/homebox",
"version": "v0.22.3",
"version": "v0.23.0",
"pinned": false,
"date": "2025-12-26T22:31:20Z"
"date": "2026-01-30T17:41:01Z"
},
{
"slug": "homepage",
@@ -508,9 +515,9 @@
{
"slug": "huntarr",
"repo": "plexguide/Huntarr.io",
"version": "9.0.5",
"version": "9.1.3",
"pinned": false,
"date": "2026-01-26T03:34:21Z"
"date": "2026-01-30T21:38:18Z"
},
{
"slug": "immich",
@@ -1131,9 +1138,9 @@
{
"slug": "rclone",
"repo": "rclone/rclone",
"version": "v1.72.1",
"version": "v1.73.0",
"pinned": false,
"date": "2025-12-10T14:55:44Z"
"date": "2026-01-30T22:12:03Z"
},
{
"slug": "rdtclient",
@@ -1236,9 +1243,9 @@
{
"slug": "snowshare",
"repo": "TuroYT/snowshare",
"version": "v1.2.11",
"version": "v1.2.12",
"pinned": false,
"date": "2026-01-22T13:26:11Z"
"date": "2026-01-30T13:35:56Z"
},
{
"slug": "sonarr",
@@ -1292,9 +1299,9 @@
{
"slug": "tandoor",
"repo": "TandoorRecipes/recipes",
"version": "2.4.0",
"version": "2.4.1",
"pinned": false,
"date": "2026-01-28T17:07:16Z"
"date": "2026-01-30T06:52:26Z"
},
{
"slug": "tasmoadmin",
@@ -1404,9 +1411,9 @@
{
"slug": "tunarr",
"repo": "chrisbenincasa/tunarr",
"version": "v1.1.10",
"version": "v1.1.11",
"pinned": false,
"date": "2026-01-30T02:10:02Z"
"date": "2026-01-30T22:34:30Z"
},
{
"slug": "uhf",
@@ -1565,9 +1572,9 @@
{
"slug": "zitadel",
"repo": "zitadel/zitadel",
"version": "v4.10.0",
"version": "v4.10.1",
"pinned": false,
"date": "2026-01-23T13:17:07Z"
"date": "2026-01-30T06:52:53Z"
},
{
"slug": "zoraxy",

View File

@@ -0,0 +1,40 @@
{
"name": "LanguageTool",
"slug": "languagetool",
"categories": [
0
],
"date_created": "2026-01-30",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 8081,
"documentation": "https://dev.languagetool.org/",
"config_path": "/opt/LanguageTool/server.properties",
"website": "https://languagetool.org/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/languagetool.webp",
"description": "LanguageTool is an Open Source proofreading software for English, Spanish, French, German, Portuguese, Polish, Dutch, and more than 20 other languages. It finds many errors that a simple spell checker cannot detect.",
"install_methods": [
{
"type": "default",
"script": "ct/languagetool.sh",
"resources": {
"cpu": 2,
"ram": 4096,
"hdd": 16,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "API is available at `http://<LXC_IP>:8081/v2`.",
"type": "info"
}
]
}

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

@@ -0,0 +1,68 @@
#!/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/ampache/ampache
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing dependencies"
$STD apt install -y \
flac \
vorbis-tools \
lame \
ffmpeg \
inotify-tools \
libavcodec-extra \
libmp3lame-dev \
libtheora-dev \
libvorbis-dev \
libvpx-dev
msg_ok "Installed dependencies"
PHP_VERSION="8.4" PHP_APACHE="YES" setup_php
setup_mariadb
MARIADB_DB_USER="ampache" MARIADB_DB_NAME="ampache" setup_mariadb_db
fetch_and_deploy_gh_release "ampache" "ampache/ampache" "prebuild" "latest" "/opt/ampache" "ampache-*_all_php8.4.zip"
msg_info "Setting up Ampache"
rm -rf /var/www/html
ln -s /opt/ampache/public /var/www/html
mv /opt/ampache/public/rest/.htaccess.dist /opt/ampache/public/rest/.htaccess
mv /opt/ampache/public/play/.htaccess.dist /opt/ampache/public/play/.htaccess
cp /opt/ampache/config/ampache.cfg.php.dist /opt/ampache/config/ampache.cfg.php
chmod 664 /opt/ampache/public/rest/.htaccess /opt/ampache/public/play/.htaccess
msg_ok "Set up Ampache"
msg_info "Configuring Database Connection"
sed -i -e 's|^database_hostname = .*|database_hostname = "localhost"|' \
-e 's|^database_name = .*|database_name = "ampache"|' \
-e 's|^database_username = .*|database_username = "ampache"|' \
-e "s|^database_password = .*|database_password = \"${MARIADB_DB_PASS}\"|" /opt/ampache/config/ampache.cfg.php
chown -R www-data:www-data /opt/ampache
msg_ok "Configured Database Connection"
msg_info "Importing Database Schema"
mariadb -u ampache -p"${MARIADB_DB_PASS}" ampache </opt/ampache/resources/sql/ampache.sql
msg_ok "Imported Database Schema"
msg_info "Configuring PHP"
sed -i -e 's/upload_max_filesize = .*/upload_max_filesize = 100M/' \
-e 's/post_max_size = .*/post_max_size = 100M/' \
-e 's/max_execution_time = .*/max_execution_time = 600/' \
-e 's/memory_limit = .*/memory_limit = 512M/' /etc/php/8.4/apache2/php.ini
$STD a2enmod rewrite
$STD systemctl restart apache2
msg_ok "Configured PHP"
motd_ssh
customize
cleanup_lxc

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,24 +13,11 @@ setting_up_container
network_check
update_os
NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs
NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs
PG_VERSION="16" setup_postgresql
PHP_VERSION="8.5" PHP_APACHE="YES" PHP_MODULE="apcu,ctype,dom,fileinfo,iconv,pgsql" setup_php
PHP_VERSION="8.5" PHP_APACHE="YES" setup_php
setup_composer
msg_info "Setting up PostgreSQL"
DB_NAME=koillection
DB_USER=koillection
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
{
echo "Koillection Credentials"
echo "Koillection Database User: $DB_USER"
echo "Koillection Database Password: $DB_PASS"
echo "Koillection Database Name: $DB_NAME"
} >>~/koillection.creds
msg_ok "Set up PostgreSQL"
PG_DB_NAME="koillection" PG_DB_USER="koillection" setup_postgresql_db
fetch_and_deploy_gh_release "koillection" "benjaminjonard/koillection" "tarball"
@@ -41,17 +28,20 @@ APP_SECRET=$(openssl rand -base64 32)
sed -i -e "s|^APP_ENV=.*|APP_ENV=prod|" \
-e "s|^APP_DEBUG=.*|APP_DEBUG=0|" \
-e "s|^APP_SECRET=.*|APP_SECRET=${APP_SECRET}|" \
-e "s|^DB_NAME=.*|DB_NAME=${DB_NAME}|" \
-e "s|^DB_USER=.*|DB_USER=${DB_USER}|" \
-e "s|^DB_PASSWORD=.*|DB_PASSWORD=${DB_PASS}|" \
-e "s|^DB_NAME=.*|DB_NAME=${PG_DB_NAME}|" \
-e "s|^DB_USER=.*|DB_USER=${PG_DB_USER}|" \
-e "s|^DB_PASSWORD=.*|DB_PASSWORD=${PG_DB_PASS}|" \
/opt/koillection/.env.local
echo 'APP_RUNTIME="Symfony\Component\Runtime\SymfonyRuntime"' >> /opt/koillection/.env.local
export COMPOSER_ALLOW_SUPERUSER=1
export APP_RUNTIME='Symfony\Component\Runtime\SymfonyRuntime'
$STD composer install --no-dev -o --no-interaction --classmap-authoritative
$STD php bin/console doctrine:migrations:migrate --no-interaction
$STD php bin/console app:translations:dump
cd assets/
$STD yarn install
$STD yarn build
mkdir -p /opt/koillection/public/uploads
chown -R www-data:www-data /opt/koillection/public/uploads
msg_ok "Configured Koillection"
@@ -60,6 +50,7 @@ cat <<EOF >/etc/apache2/sites-available/koillection.conf
<VirtualHost *:80>
ServerName koillection
DocumentRoot /opt/koillection/public
SetEnv APP_RUNTIME "Symfony\\Component\\Runtime\\SymfonyRuntime"
<Directory /opt/koillection/public>
Options Indexes FollowSymLinks
AllowOverride All

View File

@@ -0,0 +1,110 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://languagetool.org/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing dependencies"
$STD apt install -y fasttext
msg_ok "Installed dependencies"
JAVA_VERSION="21" setup_java
msg_info "Setting up LanguageTool"
RELEASE=$(curl -fsSL https://languagetool.org/download/ | grep -oP 'LanguageTool-\K[0-9]+\.[0-9]+(\.[0-9]+)?(?=\.zip)' | sort -V | tail -n1)
download_file "https://languagetool.org/download/LanguageTool-stable.zip" /tmp/LanguageTool-stable.zip
unzip -q /tmp/LanguageTool-stable.zip -d /opt
mv /opt/LanguageTool-*/ /opt/LanguageTool/
download_file "https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin" /opt/lid.176.bin
rm -f /tmp/LanguageTool-stable.zip
msg_ok "Setup LanguageTool"
ngram_dir=""
lang_code=""
max_attempts=3
attempt=0
while [[ $attempt -lt $max_attempts ]]; do
read -r -p "${TAB3}Enter language code (en, de, es, fr, nl) to download ngrams or press ENTER to skip: " lang_code
if [[ -z "$lang_code" ]]; then
break
fi
if [[ "$lang_code" =~ [[:space:]] ]]; then
((attempt++))
remaining=$((max_attempts - attempt))
if [[ $remaining -gt 0 ]]; then
msg_error "Please enter only ONE language code. You have $remaining attempt(s) remaining."
else
msg_error "Maximum attempts reached. Continuing without ngrams."
lang_code=""
fi
continue
fi
break
done
if [[ -n "$lang_code" ]]; then
if [[ "$lang_code" =~ ^(en|de|es|fr|nl)$ ]]; then
msg_info "Searching for $lang_code ngrams..."
filename=$(curl -fsSL https://languagetool.org/download/ngram-data/ | grep -oP "ngrams-${lang_code}-[0-9]+\.zip" | sort -uV | tail -n1)
if [[ -n "$filename" ]]; then
msg_info "Downloading $filename"
download_file "https://languagetool.org/download/ngram-data/${filename}" "/tmp/${filename}"
mkdir -p /opt/ngrams
msg_info "Extracting $lang_code ngrams to /opt/ngrams"
unzip -q "/tmp/${filename}" -d /opt/ngrams
rm "/tmp/${filename}"
ngram_dir="/opt/ngrams"
msg_ok "Installed $lang_code ngrams"
else
msg_info "No ngram file found for ${lang_code}"
fi
else
msg_error "Invalid language code: $lang_code"
fi
fi
cat <<EOF >/opt/LanguageTool/server.properties
fasttextModel=/opt/lid.176.bin
fasttextBinary=/usr/bin/fasttext
EOF
if [[ -n "$ngram_dir" ]]; then
echo "languageModel=/opt/ngrams" >> /opt/LanguageTool/server.properties
fi
echo "${RELEASE}" >~/.languagetool
msg_ok "Setup LanguageTool"
msg_info "Creating Service"
cat <<'EOF' >/etc/systemd/system/language-tool.service
[Unit]
Description=LanguageTool Service
After=network.target
[Service]
WorkingDirectory=/opt/LanguageTool
ExecStart=java -cp languagetool-server.jar org.languagetool.server.HTTPServer --config server.properties --public --allow-origin "*"
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now language-tool
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc

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

@@ -4460,6 +4460,8 @@ function setup_nodejs() {
# - Adds Sury PHP repo if needed
# - Installs default and user-defined modules
# - Patches php.ini for CLI, Apache, and FPM as needed
# - Handles built-in modules gracefully (e.g., opcache in PHP 8.5+)
# - Skips unavailable packages without failing
#
# Variables:
# PHP_VERSION - PHP version to install (default: 8.4)
@@ -4470,6 +4472,17 @@ function setup_nodejs() {
# PHP_UPLOAD_MAX_FILESIZE - (default: 128M)
# PHP_POST_MAX_SIZE - (default: 128M)
# PHP_MAX_EXECUTION_TIME - (default: 300)
#
# Notes on modules:
# - Base modules (always installed): bcmath, cli, curl, gd, intl, mbstring,
# readline, xml, zip, common
# - Extended modules (commonly needed): mysql, sqlite3, pgsql, redis,
# imagick, bz2, ldap, soap, imap, gmp, apcu
# - Some modules are built-in depending on PHP version:
# * PHP 8.5+: opcache is built-in (no separate package)
# * All versions: ctype, fileinfo, iconv, tokenizer, phar, posix, etc.
# are part of php-common
# - Unavailable modules are skipped with a warning, not an error
# ------------------------------------------------------------------------------
function setup_php() {
@@ -4481,23 +4494,69 @@ function setup_php() {
DISTRO_ID=$(awk -F= '/^ID=/{print $2}' /etc/os-release | tr -d '"')
DISTRO_CODENAME=$(awk -F= '/^VERSION_CODENAME=/{print $2}' /etc/os-release)
local DEFAULT_MODULES="bcmath,cli,curl,gd,intl,mbstring,opcache,readline,xml,zip"
local COMBINED_MODULES
# Parse version for compatibility checks
local PHP_MAJOR="${PHP_VERSION%%.*}"
local PHP_MINOR="${PHP_VERSION#*.}"
PHP_MINOR="${PHP_MINOR%%.*}"
# Modules that are ALWAYS part of php-common (no separate package needed)
# These are either built-in or virtual packages provided by php-common
local BUILTIN_MODULES="calendar,ctype,exif,ffi,fileinfo,ftp,gettext,iconv,pdo,phar,posix,shmop,sockets,sysvmsg,sysvsem,sysvshm,tokenizer"
# Modules that became built-in in specific PHP versions
# PHP 8.5+: opcache is now part of the core
local BUILTIN_85=""
if [[ "$PHP_MAJOR" -gt 8 ]] || [[ "$PHP_MAJOR" -eq 8 && "$PHP_MINOR" -ge 5 ]]; then
BUILTIN_85="opcache"
fi
# Base modules - essential for most PHP applications
# Note: 'common' provides many built-in extensions
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
BASE_MODULES="${BASE_MODULES},opcache"
fi
# Extended default modules - commonly needed by web applications
# These cover ~90% of typical use cases without bloat
local EXTENDED_MODULES="mysql,sqlite3,pgsql,redis,imagick,bz2,apcu"
local COMBINED_MODULES="${BASE_MODULES},${EXTENDED_MODULES}"
local PHP_MEMORY_LIMIT="${PHP_MEMORY_LIMIT:-512M}"
local PHP_UPLOAD_MAX_FILESIZE="${PHP_UPLOAD_MAX_FILESIZE:-128M}"
local PHP_POST_MAX_SIZE="${PHP_POST_MAX_SIZE:-128M}"
local PHP_MAX_EXECUTION_TIME="${PHP_MAX_EXECUTION_TIME:-300}"
# Merge default + user-defined modules
# Merge with user-defined modules
if [[ -n "$PHP_MODULE" ]]; then
COMBINED_MODULES="${DEFAULT_MODULES},${PHP_MODULE}"
else
COMBINED_MODULES="${DEFAULT_MODULES}"
COMBINED_MODULES="${COMBINED_MODULES},${PHP_MODULE}"
fi
# Filter out built-in modules (they don't have separate packages)
local FILTERED_MODULES=""
IFS=',' read -ra ALL_MODULES <<<"$COMBINED_MODULES"
for mod in "${ALL_MODULES[@]}"; do
mod=$(echo "$mod" | tr -d '[:space:]')
[[ -z "$mod" ]] && continue
# Skip if it's a known built-in module
if echo ",$BUILTIN_MODULES,$BUILTIN_85," | grep -qi ",$mod,"; then
continue
fi
# Add to filtered list
if [[ -z "$FILTERED_MODULES" ]]; then
FILTERED_MODULES="$mod"
else
FILTERED_MODULES="${FILTERED_MODULES},$mod"
fi
done
# Deduplicate
COMBINED_MODULES=$(echo "$COMBINED_MODULES" | tr ',' '\n' | awk '!seen[$0]++' | paste -sd, -)
COMBINED_MODULES=$(echo "$FILTERED_MODULES" | tr ',' '\n' | awk '!seen[$0]++' | paste -sd, -)
# Get current PHP-CLI version
local CURRENT_PHP=""
@@ -4555,16 +4614,41 @@ EOF
return 1
fi
# Build module list - without version pinning (preferences.d handles it)
# Build module list - verify each package exists before adding
local MODULE_LIST="php${PHP_VERSION}"
local SKIPPED_MODULES=""
IFS=',' read -ra MODULES <<<"$COMBINED_MODULES"
for mod in "${MODULES[@]}"; do
MODULE_LIST+=" php${PHP_VERSION}-${mod}"
mod=$(echo "$mod" | tr -d '[:space:]')
[[ -z "$mod" ]] && continue
local pkg_name="php${PHP_VERSION}-${mod}"
# Check if package exists in repository
if apt-cache show "$pkg_name" &>/dev/null; then
MODULE_LIST+=" $pkg_name"
else
# Package doesn't exist - could be built-in or renamed
if [[ -z "$SKIPPED_MODULES" ]]; then
SKIPPED_MODULES="$mod"
else
SKIPPED_MODULES="${SKIPPED_MODULES}, $mod"
fi
fi
done
# Log skipped modules (informational, not an error)
if [[ -n "$SKIPPED_MODULES" ]]; then
msg_info "Skipping unavailable/built-in modules: $SKIPPED_MODULES"
fi
if [[ "$PHP_FPM" == "YES" ]]; then
MODULE_LIST+=" php${PHP_VERSION}-fpm"
if apt-cache show "php${PHP_VERSION}-fpm" &>/dev/null; then
MODULE_LIST+=" php${PHP_VERSION}-fpm"
else
msg_warn "php${PHP_VERSION}-fpm not available"
fi
# Create systemd override for PHP-FPM to fix runtime directory issues in LXC containers
mkdir -p /etc/systemd/system/php${PHP_VERSION}-fpm.service.d/
cat <<EOF >/etc/systemd/system/php${PHP_VERSION}-fpm.service.d/override.conf
@@ -4591,38 +4675,31 @@ EOF
# Install PHP packages (pinning via preferences.d ensures correct version)
msg_info "Installing PHP ${PHP_VERSION} packages"
if ! install_packages_with_retry $MODULE_LIST; then
msg_warn "Failed to install PHP packages, attempting individual installation"
# First attempt: Install all verified packages at once
if ! $STD apt install -y $MODULE_LIST 2>/dev/null; then
msg_warn "Bulk installation failed, attempting individual installation"
# Install main package first (critical)
install_packages_with_retry "php${PHP_VERSION}" || {
if ! $STD apt install -y "php${PHP_VERSION}" 2>/dev/null; then
msg_error "Failed to install php${PHP_VERSION}"
return 1
}
fi
# Try to install Apache module individually if requested
if [[ "$PHP_APACHE" == "YES" ]]; then
install_packages_with_retry "libapache2-mod-php${PHP_VERSION}" || {
$STD apt install -y "libapache2-mod-php${PHP_VERSION}" 2>/dev/null || {
msg_warn "Could not install libapache2-mod-php${PHP_VERSION}"
}
fi
# Try to install modules individually - skip those that don't exist
for pkg in "${MODULES[@]}"; do
if apt-cache search "^php${PHP_VERSION}-${pkg}\$" 2>/dev/null | grep -q "^php${PHP_VERSION}-${pkg}"; then
install_packages_with_retry "php${PHP_VERSION}-${pkg}" || {
msg_warn "Could not install php${PHP_VERSION}-${pkg}"
}
fi
# Try to install each package individually
for pkg in $MODULE_LIST; do
[[ "$pkg" == "php${PHP_VERSION}" ]] && continue # Already installed
$STD apt install -y "$pkg" 2>/dev/null || {
msg_warn "Could not install $pkg - continuing without it"
}
done
if [[ "$PHP_FPM" == "YES" ]]; then
if apt-cache search "^php${PHP_VERSION}-fpm\$" 2>/dev/null | grep -q "^php${PHP_VERSION}-fpm"; then
install_packages_with_retry "php${PHP_VERSION}-fpm" || {
msg_warn "Could not install php${PHP_VERSION}-fpm"
}
fi
fi
fi
cache_installed_version "php" "$PHP_VERSION"
@@ -5182,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
@@ -6009,3 +6246,138 @@ EOF
msg_ok "Docker setup completed"
}
# ------------------------------------------------------------------------------
# Fetch and deploy from URL
# Downloads an archive (zip, tar.gz, or .deb) from a URL and extracts/installs it
#
# Usage: fetch_and_deploy_from_url "url" "directory"
# url - URL to the archive (zip, tar.gz, or .deb)
# directory - Destination path where the archive will be extracted
# (not used for .deb packages)
#
# Examples:
# fetch_and_deploy_from_url "https://example.com/app.tar.gz" "/opt/myapp"
# fetch_and_deploy_from_url "https://example.com/app.zip" "/opt/myapp"
# fetch_and_deploy_from_url "https://example.com/package.deb" ""
# ------------------------------------------------------------------------------
function fetch_and_deploy_from_url() {
local url="$1"
local directory="$2"
if [[ -z "$url" ]]; then
msg_error "URL parameter is required"
return 1
fi
local filename="${url##*/}"
local archive_type="zip"
if [[ "$filename" == *.tar.gz || "$filename" == *.tgz ]]; then
archive_type="tar"
elif [[ "$filename" == *.deb ]]; then
archive_type="deb"
fi
msg_info "Downloading from $url"
local tmpdir
tmpdir=$(mktemp -d) || {
msg_error "Failed to create temporary directory"
return 1
}
curl -fsSL -o "$tmpdir/$filename" "$url" || {
msg_error "Download failed: $url"
rm -rf "$tmpdir"
return 1
}
if [[ "$archive_type" == "deb" ]]; then
msg_info "Installing .deb package"
chmod 644 "$tmpdir/$filename"
$STD apt install -y "$tmpdir/$filename" || {
$STD dpkg -i "$tmpdir/$filename" || {
msg_error "Both apt and dpkg installation failed"
rm -rf "$tmpdir"
return 1
}
}
rm -rf "$tmpdir"
msg_ok "Successfully installed .deb package"
return 0
fi
if [[ -z "$directory" ]]; then
msg_error "Directory parameter is required for archive extraction"
rm -rf "$tmpdir"
return 1
fi
msg_info "Extracting archive to $directory"
mkdir -p "$directory"
if [[ "${CLEAN_INSTALL:-0}" == "1" ]]; then
rm -rf "${directory:?}/"*
fi
local unpack_tmp
unpack_tmp=$(mktemp -d)
if [[ "$archive_type" == "zip" ]]; then
ensure_dependencies unzip
unzip -q "$tmpdir/$filename" -d "$unpack_tmp" || {
msg_error "Failed to extract ZIP archive"
rm -rf "$tmpdir" "$unpack_tmp"
return 1
}
elif [[ "$archive_type" == "tar" ]]; then
tar --no-same-owner -xf "$tmpdir/$filename" -C "$unpack_tmp" || {
msg_error "Failed to extract TAR archive"
rm -rf "$tmpdir" "$unpack_tmp"
return 1
}
fi
local top_entries
top_entries=$(find "$unpack_tmp" -mindepth 1 -maxdepth 1)
if [[ "$(echo "$top_entries" | wc -l)" -eq 1 && -d "$top_entries" ]]; then
local inner_dir="$top_entries"
shopt -s dotglob nullglob
if compgen -G "$inner_dir/*" >/dev/null; then
cp -r "$inner_dir"/* "$directory/" || {
msg_error "Failed to copy contents from $inner_dir to $directory"
rm -rf "$tmpdir" "$unpack_tmp"
return 1
}
else
msg_error "Inner directory is empty: $inner_dir"
rm -rf "$tmpdir" "$unpack_tmp"
return 1
fi
shopt -u dotglob nullglob
else
shopt -s dotglob nullglob
if compgen -G "$unpack_tmp/*" >/dev/null; then
cp -r "$unpack_tmp"/* "$directory/" || {
msg_error "Failed to copy contents to $directory"
rm -rf "$tmpdir" "$unpack_tmp"
return 1
}
else
msg_error "Unpacked archive is empty"
rm -rf "$tmpdir" "$unpack_tmp"
return 1
fi
shopt -u dotglob nullglob
fi
rm -rf "$tmpdir" "$unpack_tmp"
msg_ok "Successfully deployed archive to $directory"
return 0
}