Add bmx7 to the routing selection

This commit is contained in:
Bob Mottram 2018-05-10 14:37:16 +01:00
parent 8def8ec0e1
commit 30aeea80ba
1 changed files with 19 additions and 3 deletions

View File

@ -48,6 +48,11 @@ echo ''
echo $'Scanning for BMX6 protocol...' echo $'Scanning for BMX6 protocol...'
bmx6_peers=$(avahi-browse -at | grep routing | grep -c bmx6) bmx6_peers=$(avahi-browse -at | grep routing | grep -c bmx6)
clear
echo ''
echo $'Scanning for BMX7 protocol...'
bmx7_peers=$(avahi-browse -at | grep routing | grep -c bmx7)
clear clear
echo '' echo ''
echo $'Scanning for OLSR2 protocol...' echo $'Scanning for OLSR2 protocol...'
@ -60,7 +65,7 @@ babel_peers=$(avahi-browse -at | grep routing | grep -c babel)
clear clear
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) 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)
sel=$? sel=$?
case $sel in case $sel in
@ -109,7 +114,18 @@ case $data in
echo $'Starting BMX6...' echo $'Starting BMX6...'
sudo systemctl start bmx6 sudo systemctl start bmx6
;; ;;
2) sudo "$temp_script" 'olsr2' 2) sudo "$temp_script" 'bmx7'
mesh_stop_daemon 'bmx6'
mesh_stop_daemon 'olsr2'
mesh_stop_daemon 'babel'
clear
echo ''
echo $'Enabling BMX7...'
sudo systemctl enable bmx7
echo $'Starting BMX7...'
sudo systemctl start bmx7
;;
3) sudo "$temp_script" 'olsr2'
mesh_stop_daemon 'bmx6' mesh_stop_daemon 'bmx6'
mesh_stop_daemon 'bmx7' mesh_stop_daemon 'bmx7'
mesh_stop_daemon 'babel' mesh_stop_daemon 'babel'
@ -120,7 +136,7 @@ case $data in
echo $'Starting OLSR2...' echo $'Starting OLSR2...'
sudo systemctl start olsr2 sudo systemctl start olsr2
;; ;;
3) sudo "$temp_script" 'babel' 4) sudo "$temp_script" 'babel'
mesh_stop_daemon 'bmx6' mesh_stop_daemon 'bmx6'
mesh_stop_daemon 'bmx7' mesh_stop_daemon 'bmx7'
mesh_stop_daemon 'olsr2' mesh_stop_daemon 'olsr2'