mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	Added the logging of which version upgrading from -> to
This commit is contained in:
		
							
								
								
									
										10
									
								
								daily.sh
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								daily.sh
									
									
									
									
									
								
							@@ -38,10 +38,20 @@ if [ -z "$arg" ]; then
 | 
			
		||||
        exit
 | 
			
		||||
    elif [ "$up" -eq 1 ]; then
 | 
			
		||||
        # Update to Master-Branch
 | 
			
		||||
        old_ver=$(git show --pretty="%H" -s HEAD)
 | 
			
		||||
        status_run 'Updating to latest codebase' 'git pull --quiet'
 | 
			
		||||
        new_ver=$(git show --pretty="%H" -s HEAD)
 | 
			
		||||
        if [ "$old_ver" != "$new_ver" ]; then
 | 
			
		||||
            status_run "Updated from $old_ver to $new_ver" ''
 | 
			
		||||
        fi
 | 
			
		||||
    elif [ "$up" -eq 3 ]; then
 | 
			
		||||
        # Update to last Tag
 | 
			
		||||
        old_ver=$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))
 | 
			
		||||
        status_run 'Updating to latest release' 'git fetch --tags && git checkout $(git describe --tags $(git rev-list --tags --max-count=1))'
 | 
			
		||||
        new_ver=$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))
 | 
			
		||||
        if [ "$old_ver" -ne "$new_ver" ]; then
 | 
			
		||||
            status_run "Updated from $old_ver to $new_ver" ''
 | 
			
		||||
        fi
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    cnf=$(echo $(grep '\[.distributed_poller.\]' config.php | egrep -v -e '^//' -e '^#' | cut -d = -f 2 | sed 's/;//g'))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user