Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk
103497a361 fix(tools.func): fix meilisearch import-dump background process handling
When killing the background meilisearch process after dump import,
bash would print a 'Terminated' job notification and trigger
'pop_var_context: head of shell_variables not a function context'
errors (visible as /dev/fd/63 line errors), causing the rest of
the update_script to not execute. This left meilisearch stopped
after migration and caused subsequent update runs to skip it
(binary version already matched latest).

Two fixes:
- Redirect background process output to /dev/null to suppress
  meilisearch startup log noise in the update output
- Add 'wait $MEILI_PID' after 'kill $MEILI_PID' so bash properly
  reaps the child process without printing a job status notification

Fixes #14276
2026-05-08 21:29:37 +02:00
3 changed files with 2 additions and 16 deletions

View File

@@ -464,7 +464,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🐞 Bug Fixes
- [pelican] fix env copy regression [@LetterN](https://github.com/LetterN) ([#14328](https://github.com/community-scripts/ProxmoxVE/pull/14328))
- fix(homepage): fix ERR_PNPM_IGNORED_BUILDS error [@Sergih28](https://github.com/Sergih28) ([#14315](https://github.com/community-scripts/ProxmoxVE/pull/14315))
- #### ✨ New Features

View File

@@ -45,7 +45,6 @@ function update_script() {
$STD php artisan down
msg_ok "Stopped Service"
mkdir -p /opt/backup
cp -a /opt/pelican-panel/.env /opt/backup
mkdir -p /opt/backup/storage/app/
cp -a /opt/pelican-panel/storage/app/public /opt/backup/storage/app/

View File

@@ -6510,19 +6510,6 @@ function setup_nodejs() {
MODULE_REQ_VERSION="latest"
fi
# Cap pnpm at version 10 to avoid v11+ breaking changes (ERR_PNPM_IGNORED_BUILDS)
if [[ "$MODULE_NAME" == "pnpm" ]]; then
if [[ "$MODULE_REQ_VERSION" == "latest" ]]; then
MODULE_REQ_VERSION="10"
else
local pnpm_major
pnpm_major=$(echo "${MODULE_REQ_VERSION#v}" | cut -d'.' -f1)
if [[ "$pnpm_major" =~ ^[0-9]+$ ]] && ((pnpm_major >= 11)); then
MODULE_REQ_VERSION="10"
fi
fi
fi
# Check if the module is already installed
if $STD npm list -g --depth=0 "$MODULE_NAME" 2>&1 | grep -q "$MODULE_NAME@"; then
MODULE_INSTALLED_VERSION="$(npm list -g --depth=0 "$MODULE_NAME" 2>&1 | grep "$MODULE_NAME@" | awk -F@ '{print $2}' 2>/dev/null | tr -d '[:space:]' || echo '')"
@@ -7601,7 +7588,7 @@ function setup_meilisearch() {
# 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" &
/usr/bin/meilisearch --config-file-path /etc/meilisearch.toml --import-dump "$DUMP_FILE" >/dev/null 2>&1 &
local MEILI_PID=$!
# Wait for meilisearch to become healthy (import happens during startup)
@@ -7624,6 +7611,7 @@ function setup_meilisearch() {
# Stop the manual process
kill $MEILI_PID 2>/dev/null || true
wait $MEILI_PID 2>/dev/null || true
sleep 2
# Start via systemd for proper management