Exit if no peer was selected

This commit is contained in:
Bob Mottram 2015-08-22 12:47:01 +01:00
parent bf8aeb54b2
commit 1933f64df4
1 changed files with 5 additions and 3 deletions

View File

@ -69,6 +69,11 @@ done < "$PEERS_FILE"
peer_index=0
read peer_index
# if no selection made
if [ ! $peer_index ]; then
exit 0
fi
# get the avahi domain name
AVAHI_DOMAIN=
idx=1
@ -92,9 +97,6 @@ if [ ! -f /usr/bin/irssi ]; then
exit 3
fi
fi
MESH_RUNNING=$(pgrep ngircd > /dev/null && echo Running)' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
irssi -c $AVAHI_DOMAIN -p $IRC_PORT -n $USER
exit 0