Browse Source

Add bmx7 to the routing selection

Bob Mottram 6 years ago
parent
commit
30aeea80ba
1 changed files with 19 additions and 3 deletions
  1. 19
    3
      src/freedombone-mesh-routing

+ 19
- 3
src/freedombone-mesh-routing View File

50
 
50
 
51
 clear
51
 clear
52
 echo ''
52
 echo ''
53
+echo $'Scanning for BMX7 protocol...'
54
+bmx7_peers=$(avahi-browse -at | grep routing | grep -c bmx7)
55
+
56
+clear
57
+echo ''
53
 echo $'Scanning for OLSR2 protocol...'
58
 echo $'Scanning for OLSR2 protocol...'
54
 olsr2_peers=$(avahi-browse -at | grep routing | grep -c olsr2)
59
 olsr2_peers=$(avahi-browse -at | grep routing | grep -c olsr2)
55
 
60
 
60
 
65
 
61
 clear
66
 clear
62
 
67
 
63
-data=$(zenity --list 1 $"BMX6 ($bmx6_peers)" 2 $"OLSR2 ($olsr2_peers)" 3 $"Babel ($babel_peers)" $"Select Mesh Protocol" --column="id" --title $"Mesh Protocol" --column=$"Choose the mesh protocol:" --hide-column=1 --print-column=1 --height=150)
68
+data=$(zenity --list 1 $"BMX6 ($bmx6_peers)" 2 $"BMX7 ($bmx7_peers)" 3 $"OLSR2 ($olsr2_peers)" 4 $"Babel ($babel_peers)" $"Select Mesh Protocol" --column="id" --title $"Mesh Protocol" --column=$"Choose the mesh protocol:" --hide-column=1 --print-column=1 --height=150)
64
 
69
 
65
 sel=$?
70
 sel=$?
66
 case $sel in
71
 case $sel in
109
         echo $'Starting BMX6...'
114
         echo $'Starting BMX6...'
110
         sudo systemctl start bmx6
115
         sudo systemctl start bmx6
111
         ;;
116
         ;;
112
-    2)  sudo "$temp_script" 'olsr2'
117
+    2)  sudo "$temp_script" 'bmx7'
118
+        mesh_stop_daemon 'bmx6'
119
+        mesh_stop_daemon 'olsr2'
120
+        mesh_stop_daemon 'babel'
121
+        clear
122
+        echo ''
123
+        echo $'Enabling BMX7...'
124
+        sudo systemctl enable bmx7
125
+        echo $'Starting BMX7...'
126
+        sudo systemctl start bmx7
127
+        ;;
128
+    3)  sudo "$temp_script" 'olsr2'
113
         mesh_stop_daemon 'bmx6'
129
         mesh_stop_daemon 'bmx6'
114
         mesh_stop_daemon 'bmx7'
130
         mesh_stop_daemon 'bmx7'
115
         mesh_stop_daemon 'babel'
131
         mesh_stop_daemon 'babel'
120
         echo $'Starting OLSR2...'
136
         echo $'Starting OLSR2...'
121
         sudo systemctl start olsr2
137
         sudo systemctl start olsr2
122
         ;;
138
         ;;
123
-    3)  sudo "$temp_script" 'babel'
139
+    4)  sudo "$temp_script" 'babel'
124
         mesh_stop_daemon 'bmx6'
140
         mesh_stop_daemon 'bmx6'
125
         mesh_stop_daemon 'bmx7'
141
         mesh_stop_daemon 'bmx7'
126
         mesh_stop_daemon 'olsr2'
142
         mesh_stop_daemon 'olsr2'