mirror of
				https://github.com/tteck/Proxmox.git
				synced 2025-10-30 18:39:10 +00:00 
			
		
		
		
	Update update-lxcs.sh
Start the container and perform an update if it is not a template.
This commit is contained in:
		
							parent
							
								
									565e4349ff
								
							
						
					
					
						commit
						1780cd99c5
					
				| @ -49,16 +49,11 @@ function update_container() { | ||||
|   esac | ||||
| } | ||||
| header_info | ||||
| read -p "Skip stopped containers? [y/N]" -n 1 -r | ||||
| echo | ||||
| if [[ ! $REPLY =~ ^[Yy]$ ]]; then | ||||
|   skip=no | ||||
| else | ||||
|   skip=yes | ||||
| fi | ||||
| 
 | ||||
| for container in $containers; do | ||||
|   status=$(pct status $container) | ||||
|   if [ "$skip" == "no" ] && [ "$status" == "status: stopped" ]; then | ||||
|   template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") | ||||
|    if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then | ||||
|       echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n" | ||||
|       pct start $container | ||||
|       echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n" | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user