diff --git a/ct/node-red.sh b/ct/node-red.sh index 6475aab34..3fb298fc1 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -11,7 +11,7 @@ var_cpu="${var_cpu:-1}" var_ram="${var_ram:-1024}" var_disk="${var_disk:-4}" var_os="${var_os:-debian}" -var_version="${var_version:-12}" +var_version="${var_version:-13}" var_unprivileged="${var_unprivileged:-1}" header_info "$APP" @@ -32,25 +32,20 @@ function update_script() { "2" "Install Themes" OFF \ 3>&1 1>&2 2>&3) if [ "$UPD" == "1" ]; then - if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then - if ! command -v npm >/dev/null 2>&1; then - msg_info "Installing NPM" - $STD apt-get install -y npm - msg_ok "Installed NPM" - fi - fi - msg_info "Stopping ${APP}" + NODE_VERSION="22" setup_nodejs + + msg_info "Stopping Service" 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 - msg_ok "Updated ${APP}" + msg_ok "Updated Node-Red" - msg_info "Starting ${APP}" + msg_info "Starting Service" systemctl start nodered - msg_ok "Started ${APP}" - msg_ok "Update Successful" + msg_ok "Started Service" + msg_ok "Update Successfully!" exit fi if [ "$UPD" == "2" ]; then @@ -99,4 +94,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}:1880${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:1880${CL}" diff --git a/frontend/public/json/node-red.json b/frontend/public/json/node-red.json index cc3d369bb..1e9193ed3 100644 --- a/frontend/public/json/node-red.json +++ b/frontend/public/json/node-red.json @@ -23,7 +23,7 @@ "ram": 1024, "hdd": 4, "os": "debian", - "version": "12" + "version": "13" } }, { diff --git a/install/node-red-install.sh b/install/node-red-install.sh index 3b5331a3b..bfc0f4922 100644 --- a/install/node-red-install.sh +++ b/install/node-red-install.sh @@ -14,7 +14,7 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y \ +$STD apt install -y \ git \ ca-certificates msg_ok "Installed Dependencies"