Choice of communication services over mesh

This commit is contained in:
Bob Mottram 2015-08-22 17:14:10 +01:00
parent 047523f87a
commit d733dcfef8
1 changed files with 35 additions and 5 deletions

View File

@ -82,6 +82,8 @@ read peer_index
# if no selection made
if [ ! $peer_index ]; then
echo 'Nothing was selected'
echo ''
exit 0
fi
@ -102,16 +104,44 @@ fi
# Connect to IRC
if [ ! -f /usr/bin/irssi ]; then
echo 'You need irssi installed on your system'
if [ -f /usr/bin/mumble ]; then
mumble &
exit 0
fi
echo 'You need irssi and/or mumble installed on your system'
sudo batman stop
exit 4
fi
# open mumble if it exists
if [ -f /usr/bin/mumble ]; then
mumble &
if [ ! -f /usr/bin/mumble ]; then
if [ -f /usr/bin/irssi ]; then
irssi -c $AVAHI_DOMAIN -p $IRC_PORT -n $USER
exit 0
fi
echo 'You need irssi and/or mumble installed on your system'
sudo batman stop
exit 4
fi
irssi -c $AVAHI_DOMAIN -p $IRC_PORT -n $USER
echo ''
echo 'Choose communication service:'
echo ' 1. VoIP + Instant Messaging'
echo ' 2. IRC (WARNING: not encrypted)'
echo ''
read peer_index
# if no selection made
if [ ! $peer_index ]; then
echo 'Nothing was selected'
echo ''
exit 0
fi
if [[ $peer_index == 1 ]]; then
mumble &
else
irssi -c $AVAHI_DOMAIN -p $IRC_PORT -n $USER
fi
exit 0