Use onliner for updates (#4414)

This commit is contained in:
Slaviša Arežina
2025-05-12 16:07:07 +02:00
committed by GitHub
parent 4a3ee4db67
commit 9140fd52ac
19 changed files with 106 additions and 115 deletions

View File

@@ -20,21 +20,20 @@ color
catch_errors
function update_script() {
header_info
msg_info "Updating Alpine Packages"
$STD apk update
$STD apk upgrade
msg_ok "Updated Alpine Packages"
header_info
msg_info "Updating Alpine Packages"
$STD apk -U upgrade
msg_ok "Updated Alpine Packages"
msg_info "Updating AdGuard Home"
$STD /opt/AdGuardHome/AdGuardHome --update
msg_ok "Updated AdGuard Home"
msg_info "Updating AdGuard Home"
$STD /opt/AdGuardHome/AdGuardHome --update
msg_ok "Updated AdGuard Home"
msg_info "Restarting AdGuard Home"
$STD rc-service adguardhome restart
msg_ok "Restarted AdGuard Home"
msg_info "Restarting AdGuard Home"
$STD rc-service adguardhome restart
msg_ok "Restarted AdGuard Home"
exit 0
exit 0
}
start

View File

@@ -36,7 +36,7 @@ function update_script() {
header_info
case $CHOICE in
1)
apk update && apk upgrade
$STD apk -U upgrade
exit
;;
esac
@@ -47,4 +47,4 @@ start
build_container
description
msg_ok "Completed Successfully!\n"
msg_ok "Completed Successfully!\n"

View File

@@ -20,19 +20,18 @@ color
catch_errors
function update_script() {
header_info
msg_info "Updating Alpine Packages"
apk update
apk upgrade
msg_ok "Updated Alpine Packages"
header_info
msg_info "Updating Alpine Packages"
$STD apk -U upgrade
msg_ok "Updated Alpine Packages"
msg_info "Updating Gitea"
apk upgrade gitea
msg_ok "Updated Gitea"
msg_info "Updating Gitea"
apk upgrade gitea
msg_ok "Updated Gitea"
msg_info "Restarting Gitea"
rc-service gitea restart
msg_ok "Restarted Gitea"
msg_info "Restarting Gitea"
rc-service gitea restart
msg_ok "Restarted Gitea"
}
start
@@ -42,4 +41,4 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"

View File

@@ -39,7 +39,7 @@ function update_script() {
header_info
case $CHOICE in
1)
apk update && apk upgrade
$STD apk -U upgrade
exit
;;
2)
@@ -62,4 +62,4 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${APP} should be reachable by going to the following URL.
${BL}http://${IP}:3000${CL} \n"
${BL}http://${IP}:3000${CL} \n"

View File

@@ -20,20 +20,19 @@ color
catch_errors
function update_script() {
msg_info "Updating Alpine Packages"
$STD apk update
$STD apk upgrade
msg_ok "Updated Alpine Packages"
msg_info "Updating Alpine Packages"
$STD apk -U upgrade
msg_ok "Updated Alpine Packages"
msg_info "Updating MariaDB"
$STD apk upgrade mariadb mariadb-client
msg_ok "Updated MariaDB"
msg_info "Updating MariaDB"
$STD apk upgrade mariadb mariadb-client
msg_ok "Updated MariaDB"
msg_info "Restarting MariaDB"
$STD rc-service mariadb restart
msg_ok "Restarted MariaDB"
msg_info "Restarting MariaDB"
$STD rc-service mariadb restart
msg_ok "Restarted MariaDB"
exit 0
exit 0
}
start

View File

@@ -20,24 +20,23 @@ color
catch_errors
function update_script() {
msg_info "Updating Alpine Packages"
$STD apk update
$STD apk upgrade
msg_ok "Updated Alpine Packages"
msg_info "Updating Alpine Packages"
$STD apk -U upgrade
msg_ok "Updated Alpine Packages"
msg_info "Updating Node.js and npm"
$STD apk upgrade nodejs npm
msg_ok "Updated Node.js and npm"
msg_info "Updating Node.js and npm"
$STD apk upgrade nodejs npm
msg_ok "Updated Node.js and npm"
msg_info "Updating Node-RED"
$STD npm install -g --unsafe-perm node-red
msg_ok "Updated Node-RED"
msg_info "Updating Node-RED"
$STD npm install -g --unsafe-perm node-red
msg_ok "Updated Node-RED"
msg_info "Restarting Node-RED"
$STD rc-service nodered restart
msg_ok "Restarted Node-RED"
msg_info "Restarting Node-RED"
$STD rc-service nodered restart
msg_ok "Restarted Node-RED"
exit 0
exit 0
}
start

View File

@@ -21,8 +21,7 @@ catch_errors
function update_script() {
msg_info "Updating Alpine Packages"
$STD apk update
$STD apk upgrade
$STD apk -U upgrade
msg_ok "Updated Alpine Packages"
msg_info "Updating PostgreSQL"

View File

@@ -20,20 +20,19 @@ color
catch_errors
function update_script() {
msg_info "Updating Alpine Packages"
$STD apk update
$STD apk upgrade
msg_ok "Updated Alpine Packages"
msg_info "Updating Alpine Packages"
$STD apk -U upgrade
msg_ok "Updated Alpine Packages"
msg_info "Updating Prometheus"
$STD apk upgrade prometheus
msg_ok "Updated Prometheus"
msg_info "Updating Prometheus"
$STD apk upgrade prometheus
msg_ok "Updated Prometheus"
msg_info "Restarting Prometheus"
$STD rc-service prometheus restart
msg_ok "Restarted Prometheus"
msg_info "Restarting Prometheus"
$STD rc-service prometheus restart
msg_ok "Restarted Prometheus"
exit 0
exit 0
}
start

View File

@@ -26,8 +26,7 @@ function update_script() {
fi
msg_info "Updating Alpine Packages"
$STD apk update
$STD apk upgrade
$STD apk -U upgrade
msg_ok "Updated Alpine Packages"
msg_info "Updating tinyauth"

View File

@@ -37,14 +37,15 @@ function update_script() {
header_info
case $CHOICE in
1)
apk update && apk upgrade && rc-service vaultwarden restart -q
$STD apk -U upgrade
rc-service vaultwarden restart -q
exit
;;
2)
if NEWTOKEN=$(whiptail --backtitle "Proxmox VE Helper Scripts" --passwordbox "Setup your ADMIN_TOKEN (make it strong)" 10 58 3>&1 1>&2 2>&3); then
if [[ -z "$NEWTOKEN" ]]; then exit-script; fi
if ! command -v argon2 >/dev/null 2>&1; then apk add argon2 &>/dev/null; fi
TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -e -id -k 19456 -t 2 -p 1)
TOKEN=$(echo -n "${NEWTOKEN}" | argon2 "$(openssl rand -base64 32)" -e -id -k 19456 -t 2 -p 1)
if [[ ! -f /var/lib/vaultwarden/config.json ]]; then
sed -i "s|export ADMIN_TOKEN=.*|export ADMIN_TOKEN='${TOKEN}'|" /etc/conf.d/vaultwarden
else
@@ -65,4 +66,4 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${APP} should be reachable by going to the following URL.
${BL}http://${IP}:8000${CL} \n"
${BL}http://${IP}:8000${CL} \n"

View File

@@ -21,8 +21,7 @@ catch_errors
function update_script() {
msg_info "Updating Alpine Packages"
$STD apk update
$STD apk upgrade
$STD apk -U upgrade
msg_ok "Updated Alpine Packages"
msg_info "update wireguard-tools"

View File

@@ -36,7 +36,7 @@ function update_script() {
header_info
case $CHOICE in
1)
apk update && apk upgrade
$STD apk -U upgrade
exit
;;
esac
@@ -47,4 +47,4 @@ start
build_container
description
msg_ok "Completed Successfully!\n"
msg_ok "Completed Successfully!\n"

View File

@@ -28,7 +28,7 @@ function update_script() {
header_info
if [ "$UPD" == "1" ]; then
apk update && apk upgrade
$STD apk -U upgrade
exit
fi
}

View File

@@ -20,32 +20,32 @@ color
catch_errors
function update_script() {
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE MODE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 14 60 2 \
"1" "Check for Alpine Updates" OFF \
"2" "Update NPMplus Docker Container" ON \
3>&1 1>&2 2>&3)
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE MODE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 14 60 2 \
"1" "Check for Alpine Updates" OFF \
"2" "Update NPMplus Docker Container" ON \
3>&1 1>&2 2>&3)
header_info "$APP"
header_info "$APP"
case "$UPD" in
"1")
msg_info "Updating Alpine OS"
apk update && apk 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 "NPMplus container updated"
exit
;;
esac
exit 0
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 "NPMplus container updated"
exit
;;
esac
exit 0
}
start