This commit is contained in:
Bob Mottram 2015-08-30 17:42:06 +01:00
parent 84f690dbda
commit 6558b6e6bc
1 changed files with 14 additions and 13 deletions

View File

@ -39,7 +39,7 @@ PEERS_FILE=/tmp/meshpeers.txt
TOX_PORT=33445
TOXCORE_REPO='git://github.com/irungentoo/toxcore.git'
TOX_BOOTSTRAP_ID_FILE=/var/lib/tox-bootstrapd/pubkey.txt
QTOX_INI='~/.config/tox/qtox.ini'
QTOX_INI="/home/$USER/.config/tox/qtox.ini"
# client or server installations sounds odd for a mesh, but this
# indicates whether this is a dedicated mesh peer ("yes") or
@ -159,7 +159,8 @@ function install_toxid {
}
function run_tox {
if [ -f $TOXIC_PATH ]; then
echo $QTOX_INI
if [[ -f $TOXIC_PATH || -f $QTOX_INI ]]; then
if [[ $SERVER_INSTALLATION == "no" ]]; then
# update bootstrap nodes
if [ -f $DHTNODES ]; then
@ -200,6 +201,7 @@ function run_tox {
if [ ${#PEER_TOX_ID} -gt 30 ]; then
# start client and make a friend request
if [ -f $QTOX_INI ]; then
echo 'Launch qTox'
qtox &
else
@ -313,7 +315,7 @@ fi
if [ ! -f $IRSSI_PATH ]; then
if [ ! -f $TOXIC_PATH ]; then
if [ -f $MUMBLE_PATH ]; then
MUMBLE_PATH &
$MUMBLE_PATH &
exit 0
fi
echo 'You need irssi/mumble/toxic installed on your system'
@ -379,16 +381,15 @@ if [[ $peer_index == 1 ]]; then
echo 'Mumble may not be installed on this system'
exit 5
fi
else
if [[ $peer_index == 2 ]]; then
run_tox
else
if [ -f $IRSSI_PATH ]; then
$IRSSI_PATH -c $AVAHI_DOMAIN -p $IRC_PORT -n $USER
else
echo 'Irssi/toxic/mumble may not be installed on this system'
exit 8
fi
fi
if [[ $peer_index == 2 ]]; then
run_tox
fi
if [[ $peer_index == 3 ]]; then
if [ -f $IRSSI_PATH ]; then
$IRSSI_PATH -c $AVAHI_DOMAIN -p $IRC_PORT -n $USER
fi
fi