@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-1}"
1111var_ram=" ${var_ram:- 1024} "
1212var_disk=" ${var_disk:- 4} "
1313var_os=" ${var_os:- debian} "
14- var_version=" ${var_version:- 12 } "
14+ var_version=" ${var_version:- 13 } "
1515var_unprivileged=" ${var_unprivileged:- 1} "
1616
1717header_info " $APP "
@@ -32,25 +32,20 @@ function update_script() {
3232 " 2" " Install Themes" OFF \
3333 3>&1 1>&2 2>&3 )
3434 if [ " $UPD " == " 1" ]; then
35- if [[ " $( node -v | cut -d ' v' -f 2) " == " 18." * ]]; then
36- if ! command -v npm > /dev/null 2>&1 ; then
37- msg_info " Installing NPM"
38- $STD apt-get install -y npm
39- msg_ok " Installed NPM"
40- fi
41- fi
42- msg_info " Stopping ${APP} "
35+ NODE_VERSION=" 22" setup_nodejs
36+
37+ msg_info " Stopping Service"
4338 systemctl stop nodered
44- msg_ok " Stopped ${APP} "
39+ msg_ok " Stopped Service "
4540
46- msg_info " Updating ${APP} "
41+ msg_info " Updating Node-Red "
4742 $STD npm install -g --unsafe-perm node-red
48- msg_ok " Updated ${APP} "
43+ msg_ok " Updated Node-Red "
4944
50- msg_info " Starting ${APP} "
45+ msg_info " Starting Service "
5146 systemctl start nodered
52- msg_ok " Started ${APP} "
53- msg_ok " Update Successful "
47+ msg_ok " Started Service "
48+ msg_ok " Update Successfully! "
5449 exit
5550 fi
5651 if [ " $UPD " == " 2" ]; then
@@ -99,4 +94,4 @@ description
9994msg_ok " Completed Successfully!\n"
10095echo -e " ${CREATING}${GN}${APP} setup has been successfully initialized!${CL} "
10196echo -e " ${INFO}${YW} Access it using the following URL:${CL} "
102- echo -e " ${TAB}${GATEWAY}${BGN} http://${IP} :1880${CL} "
97+ echo -e " ${TAB}${GATEWAY}${BGN} http://${IP} :1880${CL} "
0 commit comments