mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-06 02:23:50 +00:00
Compare commits
8 Commits
2026-04-04
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2d5b27a79 | ||
|
|
b72d91ef8e | ||
|
|
9ef3b919c7 | ||
|
|
70a9d99ecd | ||
|
|
e247a8ee8b | ||
|
|
68e009e9c6 | ||
|
|
f652864208 | ||
|
|
59c0052bc8 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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;'
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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;'
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user