From fbe713a383ea388e7b888f56499e91cc31f48b63 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 22 Aug 2015 12:52:18 +0100 Subject: [PATCH] If mesh doesn't start then exit --- src/freedombone-mesh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/freedombone-mesh b/src/freedombone-mesh index 05e2d56d..b760d790 100755 --- a/src/freedombone-mesh +++ b/src/freedombone-mesh @@ -39,6 +39,9 @@ fi if [ ! -f /tmp/meshtype ]; then sudo batman start + if [ ! "$?" = "0" ]; then + exit 2 + fi clear fi @@ -86,7 +89,7 @@ done < "$PEERS_FILE" if [ ! $AVAHI_DOMAIN ]; then echo 'No domain name' - exit 2 + exit 3 fi # Connect to IRC @@ -94,7 +97,7 @@ if [ ! -f /usr/bin/irssi ]; then if [ ! -f /usr/local/bin/irssi ]; then echo 'You need irssi installed on your system' sudo batman stop - exit 3 + exit 4 fi fi irssi -c $AVAHI_DOMAIN -p $IRC_PORT -n $USER