mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-08-25 13:55:44 +02:00
Breaking Change: Migrate all "Alpine" Scripts to Normal CT's (#16587)
This commit is contained in:
committed by
GitHub
parent
f0b236ec77
commit
92e72e4137
+45
-9
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
@@ -8,22 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
||||
APP="Node-Red"
|
||||
var_tags="${var_tags:-automation}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||
var_os=$(msg_menu "Choose the container OS" \
|
||||
"debian" "Debian 13" \
|
||||
"alpine" "Alpine (smaller footprint)")
|
||||
fi
|
||||
|
||||
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||
var_ram="${var_ram:-256}"
|
||||
var_disk="${var_disk:-1}"
|
||||
var_version="${var_version:-3.24}"
|
||||
else
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_version="${var_version:-13}"
|
||||
fi
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
update_deb_based() {
|
||||
if [[ ! -d /root/.node-red ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
@@ -86,6 +96,32 @@ function update_script() {
|
||||
fi
|
||||
}
|
||||
|
||||
update_alpine() {
|
||||
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-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_ok "Updated successfully!"
|
||||
}
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
run_os_update
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
Reference in New Issue
Block a user