freedombone-client 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. #!/bin/bash
  2. #
  3. # .---. . .
  4. # | | |
  5. # |--- .--. .-. .-. .-.| .-. .--.--. |.-. .-. .--. .-.
  6. # | | (.-' (.-' ( | ( )| | | | )( )| | (.-'
  7. # ' ' --' --' -' - -' ' ' -' -' -' ' - --'
  8. #
  9. # Freedom in the Cloud
  10. #
  11. # License
  12. # =======
  13. #
  14. # Copyright (C) 2015 Bob Mottram <bob@robotics.uk.to>
  15. #
  16. # This program is free software: you can redistribute it and/or modify
  17. # it under the terms of the GNU General Public License as published by
  18. # the Free Software Foundation, either version 3 of the License, or
  19. # (at your option) any later version.
  20. #
  21. # This program is distributed in the hope that it will be useful,
  22. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. # GNU General Public License for more details.
  25. #
  26. # You should have received a copy of the GNU General Public License
  27. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  28. CURR_USER=$USER
  29. # Version number of this script
  30. VERSION="1.01"
  31. WIFI_CHANNEL=2
  32. WIFI_INTERFACE=wlan0
  33. # B.A.T.M.A.N settings
  34. BATMAN_CELLID='02:BA:00:00:03:01'
  35. ESSID='mesh'
  36. # Babel
  37. BABEL_PORT=6696
  38. # ssh (from https://stribika.github.io/2015/01/04/secure-secure-shell.html)
  39. SSH_CIPHERS="chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr"
  40. SSH_MACS="hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,umac-128@openssh.com"
  41. SSH_KEX="curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256"
  42. SSH_HOST_KEY_ALGORITHMS="ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-ed25519,ssh-rsa"
  43. # see https://stribika.github.io/2015/01/04/secure-secure-shell.html
  44. function ssh_remove_small_moduli {
  45. sudo awk '$5 > 2000' /etc/ssh/moduli > /home/$CURR_USER/moduli
  46. sudo mv /home/$CURR_USER/moduli /etc/ssh/moduli
  47. }
  48. function configure_ssh_client {
  49. #sudo sed -i 's/# PasswordAuthentication.*/ PasswordAuthentication no/g' /etc/ssh/ssh_config
  50. #sudo sed -i 's/# ChallengeResponseAuthentication.*/ ChallengeResponseAuthentication no/g' /etc/ssh/ssh_config
  51. sudo sed -i "s/# HostKeyAlgorithms.*/ HostKeyAlgorithms $SSH_HOST_KEY_ALGORITHMS/g" /etc/ssh/ssh_config
  52. sudo sed -i "s/# Ciphers.*/ Ciphers $SSH_CIPHERS/g" /etc/ssh/ssh_config
  53. sudo sed -i "s/# MACs.*/ MACs $SSH_MACS/g" /etc/ssh/ssh_config
  54. if ! grep -q "HostKeyAlgorithms" /etc/ssh/ssh_config; then
  55. sudo cp /etc/ssh/ssh_config ~/ssh_config
  56. sudo chown $CURR_USER:$CURR_USER ~/ssh_config
  57. echo " HostKeyAlgorithms $SSH_HOST_KEY_ALGORITHMS" >> ~/ssh_config
  58. sudo mv ~/ssh_config /etc/ssh/ssh_config
  59. sudo chown root:root /etc/ssh/ssh_config
  60. fi
  61. sudo sed -i "s/Ciphers.*/Ciphers $SSH_CIPHERS/g" /etc/ssh/ssh_config
  62. if ! grep -q "Ciphers " /etc/ssh/ssh_config; then
  63. sudo cp /etc/ssh/ssh_config ~/ssh_config
  64. sudo chown $CURR_USER:$CURR_USER ~/ssh_config
  65. echo " Ciphers $SSH_CIPHERS" >> ~/ssh_config
  66. sudo mv ~/ssh_config /etc/ssh/ssh_config
  67. sudo chown root:root /etc/ssh/ssh_config
  68. fi
  69. sudo sed -i "s/MACs.*/MACs $SSH_MACS/g" /etc/ssh/ssh_config
  70. if ! grep -q "MACs " /etc/ssh/ssh_config; then
  71. sudo cp /etc/ssh/ssh_config ~/ssh_config
  72. sudo chown $CURR_USER:$CURR_USER ~/ssh_config
  73. echo " MACs $SSH_MACS" >> ~/ssh_config
  74. sudo mv ~/ssh_config /etc/ssh/ssh_config
  75. sudo chown root:root /etc/ssh/ssh_config
  76. fi
  77. # Create ssh keys
  78. if [ ! -f /home/$CURR_USER/.ssh/id_ed25519 ]; then
  79. ssh-keygen -t ed25519 -o -a 100
  80. fi
  81. if [ ! -f /home/$CURR_USER/.ssh/id_rsa ]; then
  82. ssh-keygen -t rsa -b 4096 -o -a 100
  83. fi
  84. ssh_remove_small_moduli
  85. echo ''
  86. echo 'Copy the following into a file called /home/username/.ssh/authorized_keys on the Freedombone server'
  87. echo ''
  88. echo $(cat /home/$CURR_USER/.ssh/id_rsa.pub)
  89. echo $(cat /home/$CURR_USER/.ssh/id_ed25519.pub)
  90. echo ''
  91. }
  92. function mesh_babel {
  93. sudo apt-get -y install babeld
  94. babel_script=/tmp/babel
  95. echo '#!/bin/bash' > $babel_script
  96. echo '' >> $babel_script
  97. echo 'if [[ $1 == "ls" || $1 == "list" ]]; then' >> $babel_script
  98. echo ' avahi-browse -at' >> $babel_script
  99. echo ' exit 0' >> $babel_script
  100. echo 'fi' >> $babel_script
  101. echo '' >> $babel_script
  102. echo 'if [[ $1 == "start" ]]; then' >> $babel_script
  103. echo ' # install avahi' >> $babel_script
  104. echo ' apt-get -y install avahi-utils avahi-autoipd avahi-daemon avahi-dnsconfd' >> $babel_script
  105. echo ' sed -i "s|#host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $babel_script
  106. echo ' sed -i "s|host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $babel_script
  107. echo ' if [ -f /bin/systemctl ]; then' >> $babel_script
  108. echo ' systemctl restart avahi-daemon' >> $babel_script
  109. echo ' else' >> $babel_script
  110. echo ' service avahi-daemon restart' >> $babel_script
  111. echo ' fi' >> $babel_script
  112. echo 'fi' >> $babel_script
  113. echo '' >> $babel_script
  114. echo "IFACE=$WIFI_INTERFACE" >> $babel_script
  115. echo 'if [[ $IFACE == "wlan0" ]]; then' >> $babel_script
  116. echo ' if grep -q "wlan1" /proc/net/dev; then' >> $babel_script
  117. echo ' IFACE=wlan1' >> $babel_script
  118. echo ' fi' >> $babel_script
  119. echo 'fi' >> $babel_script
  120. echo 'if [[ $IFACE == "wlan0" ]]; then' >> $babel_script
  121. echo ' if grep -q "wlan2" /proc/net/dev; then' >> $babel_script
  122. echo ' IFACE=wlan2' >> $babel_script
  123. echo ' fi' >> $babel_script
  124. echo 'fi' >> $babel_script
  125. echo 'if [[ $IFACE == "wlan0" ]]; then' >> $babel_script
  126. echo ' if grep -q "wlan3" /proc/net/dev; then' >> $babel_script
  127. echo ' IFACE=wlan3' >> $babel_script
  128. echo ' fi' >> $babel_script
  129. echo 'fi' >> $babel_script
  130. echo '' >> $babel_script
  131. echo 'if [[ ! grep -q "$IFACE" /proc/net/dev || $1 == "stop" ]]; then' >> $babel_script
  132. echo ' if ! grep -q "$IFACE" /proc/net/dev; then' >> $babel_script
  133. echo ' echo "Interface $IFACE was not found"' >> $babel_script
  134. echo ' else' >> $babel_script
  135. echo ' echo "Stopping"' >> $babel_script
  136. echo ' fi' >> $babel_script
  137. echo ' ifconfig $IFACE down' >> $babel_script
  138. echo ' pkill babeld' >> $babel_script
  139. echo ' if [ -f /bin/systemctl ]; then' >> $babel_script
  140. echo ' systemctl restart network-manager' >> $babel_script
  141. echo ' else' >> $babel_script
  142. echo ' service network-manager restart' >> $babel_script
  143. echo ' fi' >> $babel_script
  144. echo ' exit 1' >> $babel_script
  145. echo 'fi' >> $babel_script
  146. echo '' >> $babel_script
  147. echo 'if [ -f /bin/systemctl ]; then' >> $babel_script
  148. echo ' systemctl stop network-manager' >> $babel_script
  149. echo 'else' >> $babel_script
  150. echo ' service network-manager stop' >> $babel_script
  151. echo 'fi' >> $babel_script
  152. echo 'ifconfig $IFACE down' >> $babel_script
  153. echo -n 'iwconfig $IFACE mode ad-hoc channel ' >> $babel_script
  154. echo "$WIFI_CHANNEL essid \"$ESSID\"" >> $babel_script
  155. echo 'ifconfig $IFACE up' >> $babel_script
  156. echo -n 'ifconfig $IFACE:avahi ' >> $babel_script
  157. echo -n "$LOCAL_NETWORK_STATIC_IP_ADDRESS netmask " >> $babel_script
  158. echo '255.255.255.0 broadcast 192.168.13.255' >> $babel_script
  159. echo -n 'babeld -D $IFACE:avahi -p ' >> $babel_script
  160. echo -n "$BABEL_PORT -d 5 " >> $babel_script
  161. echo '$IFACE' >> $babel_script
  162. echo 'exit 0' >> $babel_script
  163. chmod +x $babel_script
  164. sudo mv $babel_script /usr/bin/babel
  165. }
  166. function mesh_batman {
  167. sudo apt-get -y install iproute bridge-utils libnetfilter-conntrack3 batctl
  168. sudo apt-get -y install python-dev libevent-dev ebtables python-pip
  169. sudo apt-get -y install wireless-tools rfkill
  170. batman_script=/tmp/batman
  171. echo '#!/bin/bash' > $batman_script
  172. echo '' >> $batman_script
  173. echo 'if [[ $1 == "start" ]]; then' >> $batman_script
  174. echo ' # install avahi' >> $batman_script
  175. echo ' apt-get -y install avahi-utils avahi-autoipd avahi-daemon avahi-dnsconfd' >> $batman_script
  176. echo ' sed -i "s|#host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
  177. echo ' sed -i "s|host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
  178. echo ' sed -i "s|use-ipv4=.*|use-ipv4=yes|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
  179. echo ' sed -i "s|use-ipv6=.*|use-ipv6=no|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
  180. echo ' sed -i "s|hosts:.*|hosts: files mdns4_minimal [NOTFOUND=return] dns $(hostname)|g" /etc/nsswitch.conf' >> $batman_script
  181. echo 'fi' >> $batman_script
  182. echo '' >> $batman_script
  183. echo '# Mesh definition' >> $batman_script
  184. echo "ESSID=$ESSID" >> $batman_script
  185. echo "CELLID=$BATMAN_CELLID" >> $batman_script
  186. echo "CHANNEL=$WIFI_CHANNEL" >> $batman_script
  187. echo '' >> $batman_script
  188. echo '# Ethernet bridge definition (bridged to bat0)' >> $batman_script
  189. echo 'BRIDGE=br-mesh' >> $batman_script
  190. echo "IFACE=$WIFI_INTERFACE" >> $batman_script
  191. echo 'EIFACE=eth0' >> $batman_script
  192. echo '' >> $batman_script
  193. echo 'if [[ $IFACE == "wlan0" ]]; then' >> $batman_script
  194. echo ' if grep -q "wlan1" /proc/net/dev; then' >> $batman_script
  195. echo ' IFACE=wlan1' >> $batman_script
  196. echo ' fi' >> $batman_script
  197. echo 'fi' >> $batman_script
  198. echo 'if [[ $IFACE == "wlan0" ]]; then' >> $batman_script
  199. echo ' if grep -q "wlan2" /proc/net/dev; then' >> $batman_script
  200. echo ' IFACE=wlan2' >> $batman_script
  201. echo ' fi' >> $batman_script
  202. echo 'fi' >> $batman_script
  203. echo 'if [[ $IFACE == "wlan0" ]]; then' >> $batman_script
  204. echo ' if grep -q "wlan3" /proc/net/dev; then' >> $batman_script
  205. echo ' IFACE=wlan3' >> $batman_script
  206. echo ' fi' >> $batman_script
  207. echo 'fi' >> $batman_script
  208. echo '' >> $batman_script
  209. echo 'if [ -e /etc/default/batctl ]; then' >> $batman_script
  210. echo ' . /etc/default/batctl' >> $batman_script
  211. echo 'fi' >> $batman_script
  212. echo '' >> $batman_script
  213. echo 'start() {' >> $batman_script
  214. echo ' if [ -z "$IFACE" ] ; then' >> $batman_script
  215. echo ' echo "error: unable to find wifi interface, not enabling batman-adv mesh"' >> $batman_script
  216. echo ' return' >> $batman_script
  217. echo ' fi' >> $batman_script
  218. echo ' echo "info: enabling batman-adv mesh network $ESSID on $IFACE"' >> $batman_script
  219. echo ' if [ -f /bin/systemctl ]; then' >> $batman_script
  220. echo ' systemctl stop network-manager' >> $batman_script
  221. echo ' else' >> $batman_script
  222. echo ' service network-manager stop' >> $batman_script
  223. echo ' fi' >> $batman_script
  224. echo ' sleep 5' >> $batman_script
  225. echo '' >> $batman_script
  226. echo " # remove an avahi service which isn't used" >> $batman_script
  227. echo ' if [ -f /etc/avahi/services/udisks.service ]; then' >> $batman_script
  228. echo ' sudo rm /etc/avahi/services/udisks.service' >> $batman_script
  229. echo ' fi' >> $batman_script
  230. echo '' >> $batman_script
  231. echo ' # Might have to re-enable wifi' >> $batman_script
  232. echo ' rfkill unblock $(rfkill list|awk -F: "/phy/ {print $1}") || true' >> $batman_script
  233. echo '' >> $batman_script
  234. echo ' ifconfig $IFACE down' >> $batman_script
  235. echo ' ifconfig $IFACE mtu 1532' >> $batman_script
  236. echo ' iwconfig $IFACE enc off' >> $batman_script
  237. echo ' iwconfig $IFACE mode ad-hoc essid $ESSID channel $CHANNEL' >> $batman_script
  238. echo ' sleep 1' >> $batman_script
  239. echo ' iwconfig $IFACE ap $CELLID' >> $batman_script
  240. echo '' >> $batman_script
  241. echo ' modprobe batman-adv' >> $batman_script
  242. echo ' batctl if add $IFACE' >> $batman_script
  243. echo ' ifconfig $IFACE up' >> $batman_script
  244. echo ' avahi-autoipd --force-bind --daemonize --wait $BRIDGE' >> $batman_script
  245. echo ' avahi-autoipd --force-bind --daemonize --wait $IFACE' >> $batman_script
  246. echo ' ifconfig bat0 up promisc' >> $batman_script
  247. echo '' >> $batman_script
  248. echo ' #Use persistent HWAddr' >> $batman_script
  249. echo ' ether_new=$(ifconfig eth0 | grep HWaddr | sed -e "s/.*HWaddr //")' >> $batman_script
  250. echo ' if [ ! -f /var/lib/mesh-node/bat0 ]; then' >> $batman_script
  251. echo ' mkdir /var/lib/mesh-node' >> $batman_script
  252. echo ' echo "${ether_new}" > /var/lib/mesh-node/bat0' >> $batman_script
  253. echo ' else' >> $batman_script
  254. echo ' ether=$(cat /var/lib/mesh-node/bat0)' >> $batman_script
  255. echo ' ifconfig bat0 hw ether ${ether}' >> $batman_script
  256. echo ' fi' >> $batman_script
  257. echo '' >> $batman_script
  258. echo ' if [ "$EIFACE" ] ; then' >> $batman_script
  259. echo ' brctl addbr $BRIDGE' >> $batman_script
  260. echo ' brctl addif $BRIDGE bat0' >> $batman_script
  261. echo ' brctl addif $BRIDGE $EIFACE' >> $batman_script
  262. echo ' ifconfig bat0 0.0.0.0' >> $batman_script
  263. echo ' ifconfig $EIFACE 0.0.0.0' >> $batman_script
  264. echo ' ifconfig $EIFACE up promisc' >> $batman_script
  265. echo ' ifconfig $BRIDGE up' >> $batman_script
  266. echo ' fi' >> $batman_script
  267. echo '' >> $batman_script
  268. echo ' iptables -A INPUT -p tcp -m state -m tcp --dport 548 --state NEW -j ACCEPT' >> $batman_script
  269. echo ' iptables -A INPUT -p tcp -m state -m udp --dport 548 --state NEW -j ACCEPT' >> $batman_script
  270. echo ' iptables -A INPUT -p tcp -m state -m tcp --dport 5353 --state NEW -j ACCEPT' >> $batman_script
  271. echo ' iptables -A INPUT -p tcp -m state -m udp --dport 5353 --state NEW -j ACCEPT' >> $batman_script
  272. echo ' iptables -A INPUT -p tcp -m state -m tcp --dport 5354 --state NEW -j ACCEPT' >> $batman_script
  273. echo ' iptables -A INPUT -p tcp -m state -m udp --dport 5354 --state NEW -j ACCEPT' >> $batman_script
  274. echo '' >> $batman_script
  275. echo ' if [ -f /bin/systemctl ]; then' >> $batman_script
  276. echo ' systemctl restart avahi-daemon' >> $batman_script
  277. echo ' else' >> $batman_script
  278. echo ' service avahi-daemon restart' >> $batman_script
  279. echo ' fi' >> $batman_script
  280. echo '}' >> $batman_script
  281. echo '' >> $batman_script
  282. echo 'stop() {' >> $batman_script
  283. echo ' if [ -z "$IFACE" ]; then' >> $batman_script
  284. echo ' echo "error: unable to find wifi interface, not enabling batman-adv mesh"' >> $batman_script
  285. echo ' return' >> $batman_script
  286. echo ' fi' >> $batman_script
  287. echo ' if [ "$EIFACE" ]; then' >> $batman_script
  288. echo ' brctl delif $BRIDGE bat0' >> $batman_script
  289. echo ' brctl delif $BRIDGE $EIFACE' >> $batman_script
  290. echo ' ifconfig $BRIDGE down || true' >> $batman_script
  291. echo ' brctl delbr $BRIDGE' >> $batman_script
  292. echo ' ifconfig $EIFACE down -promisc' >> $batman_script
  293. echo ' fi' >> $batman_script
  294. echo '' >> $batman_script
  295. echo ' avahi-autoipd -k $BRIDGE' >> $batman_script
  296. echo ' avahi-autoipd -k $IFACE' >> $batman_script
  297. echo ' ifconfig bat0 down -promisc' >> $batman_script
  298. echo '' >> $batman_script
  299. echo ' batctl if del $IFACE' >> $batman_script
  300. echo ' rmmod batman-adv' >> $batman_script
  301. echo ' ifconfig $IFACE mtu 1500' >> $batman_script
  302. echo ' ifconfig $IFACE down' >> $batman_script
  303. echo ' iwconfig $IFACE mode managed' >> $batman_script
  304. echo '' >> $batman_script
  305. echo ' iptables -D INPUT -p tcp -m state -m tcp --dport 548 --state NEW -j ACCEPT' >> $batman_script
  306. echo ' iptables -D INPUT -p tcp -m state -m udp --dport 548 --state NEW -j ACCEPT' >> $batman_script
  307. echo ' iptables -D INPUT -p tcp -m state -m tcp --dport 5353 --state NEW -j ACCEPT' >> $batman_script
  308. echo ' iptables -D INPUT -p tcp -m state -m udp --dport 5353 --state NEW -j ACCEPT' >> $batman_script
  309. echo ' iptables -D INPUT -p tcp -m state -m tcp --dport 5354 --state NEW -j ACCEPT' >> $batman_script
  310. echo ' iptables -D INPUT -p tcp -m state -m udp --dport 5354 --state NEW -j ACCEPT' >> $batman_script
  311. echo '' >> $batman_script
  312. echo ' if [ -f /bin/systemctl ]; then' >> $batman_script
  313. echo ' systemctl restart network-manager' >> $batman_script
  314. echo ' else' >> $batman_script
  315. echo ' service network-manager restart' >> $batman_script
  316. echo ' fi' >> $batman_script
  317. echo '}' >> $batman_script
  318. echo '' >> $batman_script
  319. echo 'if ! grep -q "$IFACE" /proc/net/dev; then' >> $batman_script
  320. echo ' echo "Interface $IFACE was not found"' >> $batman_script
  321. echo ' stop' >> $batman_script
  322. echo ' exit 1' >> $batman_script
  323. echo 'fi' >> $batman_script
  324. echo '' >> $batman_script
  325. echo 'case "$1" in' >> $batman_script
  326. echo ' start|stop)' >> $batman_script
  327. echo ' $1' >> $batman_script
  328. echo ' ;;' >> $batman_script
  329. echo ' restart)' >> $batman_script
  330. echo ' stop' >> $batman_script
  331. echo ' sleep 10' >> $batman_script
  332. echo ' start' >> $batman_script
  333. echo ' ;;' >> $batman_script
  334. echo ' status)' >> $batman_script
  335. echo ' batctl o' >> $batman_script
  336. echo ' ;;' >> $batman_script
  337. echo ' ping)' >> $batman_script
  338. echo ' batctl ping $2' >> $batman_script
  339. echo ' ;;' >> $batman_script
  340. echo ' ls|list)' >> $batman_script
  341. echo ' avahi-browse -at' >> $batman_script
  342. echo ' ;;' >> $batman_script
  343. echo ' *)' >> $batman_script
  344. echo ' echo "error: invalid parameter $1"' >> $batman_script
  345. echo ' echo "usage: $0 {start|stop|restart|status|ping|ls|list}"' >> $batman_script
  346. echo ' exit 2' >> $batman_script
  347. echo ' ;;' >> $batman_script
  348. echo 'esac' >> $batman_script
  349. echo 'exit 0' >> $batman_script
  350. chmod +x $batman_script
  351. sudo mv $batman_script /usr/bin/batman
  352. }
  353. function show_help {
  354. echo ''
  355. echo 'freedombone-client'
  356. echo ''
  357. exit 0
  358. }
  359. while [[ $# > 1 ]]
  360. do
  361. key="$1"
  362. case $key in
  363. -h|--help)
  364. show_help
  365. ;;
  366. *)
  367. # unknown option
  368. ;;
  369. esac
  370. shift
  371. done
  372. echo 'Configuring client'
  373. configure_ssh_client
  374. mesh_batman
  375. mesh_babel
  376. echo 'Configuration complete'
  377. exit 0