Last active
          July 24, 2018 00:12 
        
      - 
      
- 
        Save TobleMiner/6eab124a468d509219aba38bbb0c613a to your computer and use it in GitHub Desktop. 
    Get gateway address of gluon devices using an additional respondd service 
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | gwid="`batctl gwl | grep '=>' | cut -d' ' -f2 | tr -d ':'`" | |
| [ -z "$gwid" ] && exit 1 | |
| gluon-neighbour-info -p 1001 -d ff02::1 -i bat0 -r gateway | \ | |
| while read resp; do | |
| node_id="`echo "$resp" | jsonfilter -e '$.node_id'`" | |
| if [[ "$node_id" == "$gwid" ]]; then | |
| echo "$resp" | jsonfilter -e '$.address.ipv4' | |
| fi | |
| done | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment