mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	This eliminates nearly all of the user-facing references to Observium, including in the names of temporary files and in the metadata of PDFs. Many of these may not be used any more, but I've adjusted them anyway. These changes should also make it easier to change the branding later if it is needed. There are a few references of which I still don't understand the significance, so I've left them as-is for now. The Unix agent in particular is rather untidy.
		
			
				
	
	
		
			20 lines
		
	
	
		
			570 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			570 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
# Cache the file for 30 minutes
 | 
						|
# If you want to override this, put the command in cron.
 | 
						|
# We cache because it is a 1sec delay, which is painful for the poller
 | 
						|
if [ -x /bin/rpm ]; then
 | 
						|
  DATE=$(date +%s)
 | 
						|
  FILE=/tmp/agent-local-rpm
 | 
						|
  if [ ! -e $FILE ]; then
 | 
						|
    /bin/rpm -q --all --queryformat '%{N} %{V} %{R} %{ARCH} %{SIZE}\n' > $FILE
 | 
						|
  fi
 | 
						|
  FILEMTIME=$(stat -c %Y $FILE)
 | 
						|
  FILEAGE=$(($DATE-$FILEMTIME))
 | 
						|
  if [ $FILEAGE -gt 1800 ]; then
 | 
						|
    /bin/rpm -q --all --queryformat '%{N} %{V} %{R} %{ARCH} %{SIZE}\n' > $FILE
 | 
						|
  fi
 | 
						|
  echo "<<<rpm>>>"
 | 
						|
  cat $FILE
 | 
						|
fi
 | 
						|
 |