mirror of
				https://github.com/cmur2/munin-pcsensor.git
				synced 2025-11-04 04:25:13 +01:00 
			
		
		
		
	Only use the first line of output
This commit is contained in:
		
							
								
								
									
										6
									
								
								pcsensor
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								pcsensor
									
									
									
									
									
								
							@@ -18,13 +18,13 @@ if [ "${1}" = "config" ]; then
 | 
			
		||||
	echo "temp.label temperatue"
 | 
			
		||||
	echo "temp.type GAUGE"
 | 
			
		||||
else
 | 
			
		||||
	TEMP=`${PCSENSOR} -cm`
 | 
			
		||||
	TEMP=`${PCSENSOR} -cm | head -n 1`
 | 
			
		||||
	if [[ $? != 0 ]]; then
 | 
			
		||||
		sleep 2
 | 
			
		||||
		TEMP=`${PCSENSOR} -cm`
 | 
			
		||||
		TEMP=`${PCSENSOR} -cm | head -n 1`
 | 
			
		||||
		if [[ $? != 0 ]]; then
 | 
			
		||||
			sleep 6
 | 
			
		||||
			TEMP=`${PCSENSOR} -cm`
 | 
			
		||||
			TEMP=`${PCSENSOR} -cm | head -n 1`
 | 
			
		||||
		fi
 | 
			
		||||
	fi
 | 
			
		||||
	echo "temp.value $TEMP"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user