mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	We need to do a puppet apply immediately after deploying this, or our rabbitmq consumer state files will become stale. (imported from commit 18696a5a8b1ff431425d1f71c208acc9bf0694f2)
		
			
				
	
	
		
			16 lines
		
	
	
		
			340 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			340 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash -e
 | 
						|
 | 
						|
queue=$1
 | 
						|
 | 
						|
if [ -z "$queue" ]; then
 | 
						|
    echo "Usage: $0 <queue-name>"
 | 
						|
    exit 2
 | 
						|
fi
 | 
						|
 | 
						|
ZULIP_DIR=/home/zulip/deployments/current
 | 
						|
STATE_DIR=/var/lib/nagios_state
 | 
						|
STATE_FILE=$STATE_DIR/check-rabbitmq-consumers-$queue
 | 
						|
 | 
						|
$ZULIP_DIR/bots/check-rabbitmq-consumers --queue=$queue &> ${STATE_FILE}-tmp;
 | 
						|
mv ${STATE_FILE}-tmp $STATE_FILE
 |