refactor(update-scripts): remove menus where sequential updates suffice

- alpine-nextcloud: add apk upgrade as the update action (was missing)
- meilisearch: run meilisearch + UI updates sequentially (like bar-assistant)
- npmplus: run alpine upgrade + docker pull sequentially, no menu
- vaultwarden: update VaultWarden + Web-Vault sequentially, remove admin
  token option (interactive-only, not suitable for unattended updates)
- alpine-vaultwarden: just run apk upgrade, remove admin token menu
This commit is contained in:
CanbiZ (MickLesk)
2026-02-09 09:37:18 +01:00
parent d6f9cc7b59
commit 2f676df1cb
5 changed files with 36 additions and 52 deletions

View File

@@ -26,21 +26,29 @@ function update_script() {
fi
CHOICE=$(msg_menu "Nextcloud Options" \
"1" "Nextcloud Login Credentials" \
"2" "Renew Self-signed Certificate")
"1" "Update Alpine Packages" \
"2" "Nextcloud Login Credentials" \
"3" "Renew Self-signed Certificate")
case $CHOICE in
1)
cat nextcloud.creds
msg_info "Updating Alpine Packages"
$STD apk -U upgrade
msg_ok "Updated Alpine Packages"
msg_ok "Updated successfully!"
exit
;;
2)
cat nextcloud.creds
exit
;;
3)
openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/nextcloud-selfsigned.key -out /etc/ssl/certs/nextcloud-selfsigned.crt -subj "/C=US/O=Nextcloud/OU=Domain Control Validated/CN=nextcloud.local" >/dev/null 2>&1
rc-service nginx restart
msg_ok "Renewed self-signed certificate"
exit
;;
esac
exit 0
}
start

View File

@@ -24,20 +24,9 @@ function update_script() {
check_container_storage
check_container_resources
UPD=$(msg_menu "Meilisearch Update Options" \
"1" "Update Meilisearch" \
"2" "Update Meilisearch-UI")
setup_meilisearch
if [ "$UPD" == "1" ]; then
setup_meilisearch
exit
fi
if [ "$UPD" == "2" ]; then
if [[ ! -d /opt/meilisearch-ui ]]; then
msg_error "No Meilisearch-UI Installation Found!"
exit
fi
if [[ -d /opt/meilisearch-ui ]]; then
if check_for_gh_release "meilisearch-ui" "riccox/meilisearch-ui"; then
msg_info "Stopping Meilisearch-UI"
systemctl stop meilisearch-ui
@@ -57,10 +46,11 @@ function update_script() {
msg_info "Starting Meilisearch-UI"
systemctl start meilisearch-ui
msg_ok "Started Meilisearch-UI"
msg_ok "Updated successfully!"
fi
exit
fi
msg_ok "Updated successfully!"
exit
}
start

View File

@@ -32,7 +32,7 @@ function update_script() {
msg_error "The repository's GPG key uses SHA-1 signatures, which are no longer accepted by Debian as of February 1, 2026."
msg_error "The issue is tracked in openresty/openresty#1097"
msg_error "For more details, see: https://github.com/community-scripts/ProxmoxVE/issues/11406"
exit 75
exit 1
if [[ $(grep -E '^VERSION_ID=' /etc/os-release) == *"12"* ]]; then
msg_error "Wrong Debian version detected!"

View File

@@ -20,31 +20,21 @@ color
catch_errors
function update_script() {
UPD=$(msg_menu "NPMplus Update Options" \
"1" "Check for Alpine Updates" \
"2" "Update NPMplus Docker Container")
header_info "$APP"
case "$UPD" in
"1")
msg_info "Updating Alpine OS"
$STD apk -U upgrade
msg_ok "System updated"
exit
;;
"2")
msg_info "Updating NPMplus Container"
cd /opt
msg_info "Pulling latest container image"
$STD docker compose pull
msg_info "Recreating container"
$STD docker compose up -d
msg_ok "Updated successfully!"
exit
;;
esac
exit 0
msg_info "Updating Alpine OS"
$STD apk -U upgrade
msg_ok "System updated"
msg_info "Pulling latest NPMplus container image"
cd /opt
$STD docker compose pull
msg_info "Recreating container"
$STD docker compose up -d
msg_ok "Updated NPMplus container"
msg_ok "Updated successfully!"
exit
}
start

View File

@@ -32,9 +32,8 @@ function update_script() {
WVRELEASE=$(get_latest_github_release "dani-garcia/bw_web_builds")
UPD=$(msg_menu "Vaultwarden Update Options" \
"1" "VaultWarden $VAULT" \
"2" "Web-Vault $WVRELEASE" \
"3" "Set Admin Token")
"1" "Update VaultWarden + Web-Vault" \
"2" "Set Admin Token")
if [ "$UPD" == "1" ]; then
if check_for_gh_release "vaultwarden" "dani-garcia/vaultwarden"; then
@@ -58,14 +57,10 @@ function update_script() {
msg_info "Starting Service"
systemctl start vaultwarden
msg_ok "Started Service"
msg_ok "Updated successfully!"
else
msg_ok "VaultWarden is already up-to-date"
fi
exit
fi
if [ "$UPD" == "2" ]; then
if check_for_gh_release "vaultwarden_webvault" "dani-garcia/bw_web_builds"; then
msg_info "Stopping Service"
systemctl stop vaultwarden
@@ -83,14 +78,15 @@ function update_script() {
msg_info "Starting Service"
systemctl start vaultwarden
msg_ok "Started Service"
msg_ok "Updated successfully!"
else
msg_ok "Web-Vault is already up-to-date"
fi
msg_ok "Updated successfully!"
exit
fi
if [ "$UPD" == "3" ]; then
if [ "$UPD" == "2" ]; then
if [[ "${PHS_SILENT:-0}" == "1" ]]; then
msg_warn "Set Admin Token requires interactive mode, skipping."
exit