|
@@ -39,6 +39,7 @@ PEERS_FILE=/tmp/meshpeers.txt
|
39
|
39
|
TOX_PORT=33445
|
40
|
40
|
TOXCORE_REPO='git://github.com/irungentoo/toxcore.git'
|
41
|
41
|
TOX_BOOTSTRAP_ID_FILE=/var/lib/tox-bootstrapd/pubkey.txt
|
|
42
|
+QTOX_INI='~/.config/tox/qtox.ini'
|
42
|
43
|
|
43
|
44
|
# client or server installations sounds odd for a mesh, but this
|
44
|
45
|
# indicates whether this is a dedicated mesh peer ("yes") or
|
|
@@ -198,13 +199,18 @@ function run_tox {
|
198
|
199
|
# if this is a valid ID
|
199
|
200
|
if [ ${#PEER_TOX_ID} -gt 30 ]; then
|
200
|
201
|
# start client and make a friend request
|
201
|
|
- echo "n
|
|
202
|
+ if [ -f $QTOX_INI ]; then
|
|
203
|
+ qtox &
|
|
204
|
+ else
|
|
205
|
+
|
|
206
|
+ echo "n
|
202
|
207
|
/nick $USER
|
203
|
208
|
/add $PEER_TOX_ID
|
204
|
209
|
/exit
|
205
|
210
|
" | $TOXIC_PATH -d
|
206
|
|
- # Running twice is a hack to get around buggyness in the client
|
207
|
|
- $TOXIC_PATH -d
|
|
211
|
+ # Running twice is a hack to get around buggyness in the client
|
|
212
|
+ $TOXIC_PATH -d
|
|
213
|
+ fi
|
208
|
214
|
exit 0
|
209
|
215
|
else
|
210
|
216
|
# ID was invalid
|