If mesh doesn't start then exit

This commit is contained in:
Bob Mottram 2015-08-22 12:52:18 +01:00
parent 1933f64df4
commit fbe713a383
1 changed files with 5 additions and 2 deletions

View File

@ -39,6 +39,9 @@ fi
if [ ! -f /tmp/meshtype ]; then if [ ! -f /tmp/meshtype ]; then
sudo batman start sudo batman start
if [ ! "$?" = "0" ]; then
exit 2
fi
clear clear
fi fi
@ -86,7 +89,7 @@ done < "$PEERS_FILE"
if [ ! $AVAHI_DOMAIN ]; then if [ ! $AVAHI_DOMAIN ]; then
echo 'No domain name' echo 'No domain name'
exit 2 exit 3
fi fi
# Connect to IRC # Connect to IRC
@ -94,7 +97,7 @@ if [ ! -f /usr/bin/irssi ]; then
if [ ! -f /usr/local/bin/irssi ]; then if [ ! -f /usr/local/bin/irssi ]; then
echo 'You need irssi installed on your system' echo 'You need irssi installed on your system'
sudo batman stop sudo batman stop
exit 3 exit 4
fi fi
fi fi
irssi -c $AVAHI_DOMAIN -p $IRC_PORT -n $USER irssi -c $AVAHI_DOMAIN -p $IRC_PORT -n $USER