Compare commits

...

8 Commits

Author SHA1 Message Date
community-scripts-pr-app[bot]
c2d5b27a79 Update CHANGELOG.md (#13538)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-05 19:51:33 +00:00
CanbiZ (MickLesk)
b72d91ef8e Grist: remove install:ee step (private repo, not needed for grist-core) (#13526) 2026-04-05 21:51:10 +02:00
community-scripts-pr-app[bot]
9ef3b919c7 Update CHANGELOG.md (#13537)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-05 19:28:59 +00:00
CanbiZ (MickLesk)
70a9d99ecd Nginx Proxy Manager: ensure /tmp/nginx/body exists via openresty service ExecStartPre (#13528) 2026-04-05 21:28:34 +02:00
community-scripts-pr-app[bot]
e247a8ee8b Update CHANGELOG.md (#13535)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-05 19:04:34 +00:00
CanbiZ (MickLesk)
68e009e9c6 MotionEye: run as root to enable SMB share support (#13527) 2026-04-05 21:04:08 +02:00
community-scripts-pr-app[bot]
f652864208 Update CHANGELOG.md (#13534)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-05 19:03:18 +00:00
CanbiZ (MickLesk)
59c0052bc8 core: silent() function - use return instead of exit to allow || true error handling (#13529) 2026-04-05 21:02:56 +02:00
9 changed files with 57 additions and 48 deletions

View File

@@ -441,6 +441,20 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
## 2026-04-05
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Grist: remove install:ee step (private repo, not needed for grist-core) [@MickLesk](https://github.com/MickLesk) ([#13526](https://github.com/community-scripts/ProxmoxVE/pull/13526))
- Nginx Proxy Manager: ensure /tmp/nginx/body exists via openresty service [@MickLesk](https://github.com/MickLesk) ([#13528](https://github.com/community-scripts/ProxmoxVE/pull/13528))
- MotionEye: run as root to enable SMB share support [@MickLesk](https://github.com/MickLesk) ([#13527](https://github.com/community-scripts/ProxmoxVE/pull/13527))
### 💾 Core
- #### 🔧 Refactor
- core: silent() function - use return instead of exit to allow || true error handling [@MickLesk](https://github.com/MickLesk) ([#13529](https://github.com/community-scripts/ProxmoxVE/pull/13529))
## 2026-04-04
### 🧰 Tools

View File

@@ -53,7 +53,6 @@ function update_script() {
[[ -f /opt/grist_bak/landing.db ]] && cp /opt/grist_bak/landing.db /opt/grist/landing.db
cd /opt/grist
$STD yarn install
$STD yarn run install:ee
$STD yarn run build:prod
$STD yarn run install:python
msg_ok "Updated Grist"

View File

@@ -86,6 +86,7 @@ Wants=network-online.target
[Service]
Type=simple
ExecStartPre=-/bin/mkdir -p /tmp/nginx/body /run/nginx
ExecStartPre=/usr/local/openresty/nginx/sbin/nginx -t
ExecStart=/usr/local/openresty/nginx/sbin/nginx -g 'daemon off;'

View File

@@ -28,7 +28,6 @@ export CYPRESS_INSTALL_BINARY=0
export NODE_OPTIONS="--max-old-space-size=2048"
cd /opt/grist
$STD yarn install
$STD yarn run install:ee
$STD yarn run build:prod
$STD yarn run install:python
cat <<EOF >/opt/grist/.env

View File

@@ -50,6 +50,7 @@ msg_ok "Installed MotionEye"
msg_info "Creating Service"
curl -fsSL "https://raw.githubusercontent.com/motioneye-project/motioneye/dev/motioneye/extra/motioneye.systemd" -o "/etc/systemd/system/motioneye.service"
sed -i 's/^User=.*/User=root/' /etc/systemd/system/motioneye.service
systemctl enable -q --now motioneye
msg_ok "Created Service"

View File

@@ -62,6 +62,7 @@ Wants=network-online.target
[Service]
Type=simple
ExecStartPre=-/bin/mkdir -p /tmp/nginx/body /run/nginx
ExecStartPre=/usr/local/openresty/nginx/sbin/nginx -t
ExecStart=/usr/local/openresty/nginx/sbin/nginx -g 'daemon off;'

View File

@@ -527,29 +527,23 @@ silent() {
fi
if [[ $rc -ne 0 ]]; then
# Source explain_exit_code if needed
if ! declare -f explain_exit_code >/dev/null 2>&1; then
if ! source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func); then
explain_exit_code() { echo "unknown (error_handler.func download failed)"; }
fi
fi
# Return instead of exit so that callers can use `$STD cmd || true`
# or `if $STD cmd; then ...` to handle errors gracefully.
# When no || / if is used, set -e + ERR trap will still catch it
# and error_handler() will display the error and exit.
#
# Set flag so error_handler knows to show log tail from silent's logfile
export _SILENT_FAILED_RC="$rc"
export _SILENT_FAILED_CMD="$cmd"
export _SILENT_FAILED_LINE="$caller_line"
export _SILENT_FAILED_LOG="$logfile"
local explanation
explanation="$(explain_exit_code "$rc")"
printf "\e[?25h"
msg_error "in line ${caller_line}: exit code ${rc} (${explanation})"
msg_custom "→" "${YWB}" "${cmd}"
if [[ -s "$logfile" ]]; then
echo -e "\n${TAB}--- Last 20 lines of log ---"
tail -n 20 "$logfile"
echo -e "${TAB}-----------------------------------"
echo -e "${TAB}📋 Full log: ${logfile}\n"
fi
exit "$rc"
return "$rc"
fi
# Clear stale flags on success (prevents false positives if a previous
# $STD cmd || true failed and a later non-silent command triggers error_handler)
unset _SILENT_FAILED_RC _SILENT_FAILED_CMD _SILENT_FAILED_LINE _SILENT_FAILED_LOG 2>/dev/null || true
}
# ------------------------------------------------------------------------------

View File

@@ -236,6 +236,16 @@ error_handler() {
command="${command//\$STD/}"
# If error originated from silent(), use its captured metadata
# This provides the actual command and line number instead of "silent ..."
if [[ -n "${_SILENT_FAILED_RC:-}" ]]; then
exit_code="$_SILENT_FAILED_RC"
command="$_SILENT_FAILED_CMD"
line_number="$_SILENT_FAILED_LINE"
# Clear flags to prevent stale data on subsequent errors
unset _SILENT_FAILED_RC _SILENT_FAILED_CMD _SILENT_FAILED_LINE
fi
if [[ "$exit_code" -eq 0 ]]; then
return 0
fi
@@ -279,8 +289,12 @@ error_handler() {
fi
# Get active log file (BUILD_LOG or INSTALL_LOG)
# Prefer silent()'s logfile when available (contains the actual command output)
local active_log=""
if declare -f get_active_logfile >/dev/null 2>&1; then
if [[ -n "${_SILENT_FAILED_LOG:-}" && -s "${_SILENT_FAILED_LOG}" ]]; then
active_log="$_SILENT_FAILED_LOG"
unset _SILENT_FAILED_LOG
elif declare -f get_active_logfile >/dev/null 2>&1; then
active_log="$(get_active_logfile)"
elif [[ -n "${SILENT_LOGFILE:-}" ]]; then
active_log="$SILENT_LOGFILE"

View File

@@ -188,32 +188,18 @@ silent() {
trap 'error_handler' ERR
if [[ $rc -ne 0 ]]; then
# Source explain_exit_code if needed
if ! declare -f explain_exit_code >/dev/null 2>&1; then
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVE/raw/branch/main/misc/error_handler.func) 2>/dev/null || true
fi
# Return instead of exit so that callers can use `$STD cmd || true`
# When no || is used, set -e + ERR trap catches it via error_handler()
export _SILENT_FAILED_RC="$rc"
export _SILENT_FAILED_CMD="$cmd"
export _SILENT_FAILED_LINE="$caller_line"
export _SILENT_FAILED_LOG="$logfile"
local explanation=""
if declare -f explain_exit_code >/dev/null 2>&1; then
explanation="$(explain_exit_code "$rc")"
fi
printf "\e[?25h"
if [[ -n "$explanation" ]]; then
msg_error "in line ${caller_line}: exit code ${rc} (${explanation})"
else
msg_error "in line ${caller_line}: exit code ${rc}"
fi
msg_custom "→" "${YWB}" "${cmd}"
if [[ -s "$logfile" ]]; then
echo -e "\n${TAB}--- Last 20 lines of log ---"
tail -n 20 "$logfile"
echo -e "${TAB}----------------------------\n"
fi
exit "$rc"
return "$rc"
fi
# Clear stale flags on success
unset _SILENT_FAILED_RC _SILENT_FAILED_CMD _SILENT_FAILED_LINE _SILENT_FAILED_LOG 2>/dev/null || true
}
# ------------------------------------------------------------------------------