mirror of https://github.com/tteck/Proxmox.git
				
				
				
			Update node-red.sh
(node 18.x has stopped utilizing npm by default) - check if the installed version of Node.js is 18.x and, if so, ensures that npm is also installed. - fixes https://github.com/tteck/Proxmox/issues/2283
This commit is contained in:
		
							parent
							
								
									9fda1994d7
								
							
						
					
					
						commit
						b7a9d517e7
					
				| 
						 | 
					@ -58,6 +58,13 @@ UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radio
 | 
				
			||||||
  3>&1 1>&2 2>&3)
 | 
					  3>&1 1>&2 2>&3)
 | 
				
			||||||
header_info
 | 
					header_info
 | 
				
			||||||
if [ "$UPD" == "1" ]; then
 | 
					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"
 | 
				
			||||||
 | 
					      apt-get install -y npm >/dev/null 2>&1
 | 
				
			||||||
 | 
					      msg_ok "Installed NPM"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
msg_info "Stopping ${APP}"
 | 
					msg_info "Stopping ${APP}"
 | 
				
			||||||
systemctl stop nodered
 | 
					systemctl stop nodered
 | 
				
			||||||
msg_ok "Stopped ${APP}"
 | 
					msg_ok "Stopped ${APP}"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue