Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk f348700958 fix(build): skip LXC stack upgrade prompt in unattended mode
Honor PHS_SILENT=1 and DISABLE_UPDATE=yes by auto-ignoring the host
upgrade dialog, matching silent container update behavior.
2026-06-22 21:39:22 +02:00
3 changed files with 8 additions and 25 deletions
+3 -14
View File
@@ -29,21 +29,10 @@ function update_script() {
exit
fi
setup_mariadb
ensure_dependencies git
if [[ ! -d /opt/librenms/.git ]]; then
msg_info "Initializing LibreNMS git metadata"
LIBRENMS_VERSION=$(cat ~/.librenms 2>/dev/null)
cd /opt/librenms
git init -q
git remote add origin https://github.com/librenms/librenms.git
git fetch --depth 1 origin "refs/tags/v${LIBRENMS_VERSION}" 2>/dev/null ||
git fetch --depth 1 origin "refs/tags/${LIBRENMS_VERSION}" 2>/dev/null || true
git checkout -qf FETCH_HEAD 2>/dev/null || true
chown -R librenms:librenms .git
msg_ok "Initialized LibreNMS git metadata"
fi
msg_info "Updating LibreNMS"
$STD su - librenms -s /bin/bash -c 'cd /opt/librenms && ./daily.sh'
su librenms
cd /opt/librenms
./daily.sh
msg_ok "Updated LibreNMS"
exit
}
-11
View File
@@ -17,7 +17,6 @@ msg_info "Installing Dependencies"
$STD apt install -y \
acl \
fping \
git \
graphviz \
imagemagick \
mtr-tiny \
@@ -65,16 +64,6 @@ EOF
chown -R librenms:librenms /opt/librenms
chmod 771 /opt/librenms
chmod -R ug=rwX /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd
if [[ ! -d /opt/librenms/.git ]]; then
LIBRENMS_VERSION=$(cat ~/.librenms 2>/dev/null)
cd /opt/librenms
git init -q
git remote add origin https://github.com/librenms/librenms.git
git fetch --depth 1 origin "refs/tags/v${LIBRENMS_VERSION}" 2>/dev/null ||
git fetch --depth 1 origin "refs/tags/${LIBRENMS_VERSION}" 2>/dev/null || true
git checkout -qf FETCH_HEAD 2>/dev/null || true
chown -R librenms:librenms .git
fi
msg_ok "Configured LibreNMS"
msg_info "Configure MariaDB"
+5
View File
@@ -5722,6 +5722,11 @@ create_lxc_container() {
return 0
fi
if [[ "${PHS_SILENT:-0}" == "1" || "${DISABLE_UPDATE,,}" == "yes" ]]; then
msg_info "Skipping host LXC stack upgrade prompt (unattended mode)"
return 2
fi
msg_warn "An update for the Proxmox LXC stack is available"
echo " pve-container: installed=${_pvec_i:-n/a} candidate=${_pvec_c:-n/a}"
echo " lxc-pve : installed=${_lxcp_i:-n/a} candidate=${_lxcp_c:-n/a}"