Node-Red: bump to Debian 13 (#8141)

This commit is contained in:
CanbiZ 2025-10-06 13:47:14 +02:00 committed by GitHub
parent e87dc5dbbc
commit 2092c5bdce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 18 deletions

View File

@ -11,7 +11,7 @@ var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-1024}" var_ram="${var_ram:-1024}"
var_disk="${var_disk:-4}" var_disk="${var_disk:-4}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-12}" var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}" var_unprivileged="${var_unprivileged:-1}"
header_info "$APP" header_info "$APP"
@ -32,25 +32,20 @@ function update_script() {
"2" "Install Themes" OFF \ "2" "Install Themes" OFF \
3>&1 1>&2 2>&3) 3>&1 1>&2 2>&3)
if [ "$UPD" == "1" ]; then if [ "$UPD" == "1" ]; then
if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then NODE_VERSION="22" setup_nodejs
if ! command -v npm >/dev/null 2>&1; then
msg_info "Installing NPM" msg_info "Stopping Service"
$STD apt-get install -y npm
msg_ok "Installed NPM"
fi
fi
msg_info "Stopping ${APP}"
systemctl stop nodered systemctl stop nodered
msg_ok "Stopped ${APP}" msg_ok "Stopped Service"
msg_info "Updating ${APP}" msg_info "Updating Node-Red"
$STD npm install -g --unsafe-perm node-red $STD npm install -g --unsafe-perm node-red
msg_ok "Updated ${APP}" msg_ok "Updated Node-Red"
msg_info "Starting ${APP}" msg_info "Starting Service"
systemctl start nodered systemctl start nodered
msg_ok "Started ${APP}" msg_ok "Started Service"
msg_ok "Update Successful" msg_ok "Update Successfully!"
exit exit
fi fi
if [ "$UPD" == "2" ]; then if [ "$UPD" == "2" ]; then
@ -99,4 +94,4 @@ description
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:1880${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:1880${CL}"

View File

@ -23,7 +23,7 @@
"ram": 1024, "ram": 1024,
"hdd": 4, "hdd": 4,
"os": "debian", "os": "debian",
"version": "12" "version": "13"
} }
}, },
{ {

View File

@ -14,7 +14,7 @@ network_check
update_os update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y \ $STD apt install -y \
git \ git \
ca-certificates ca-certificates
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"