ソースを参照

Run qtox if it exists

Bob Mottram 9 年 前
コミット
84f690dbda
共有1 個のファイルを変更した9 個の追加3 個の削除を含む
  1. 9
    3
      src/freedombone-mesh

+ 9
- 3
src/freedombone-mesh ファイルの表示

39
 TOX_PORT=33445
39
 TOX_PORT=33445
40
 TOXCORE_REPO='git://github.com/irungentoo/toxcore.git'
40
 TOXCORE_REPO='git://github.com/irungentoo/toxcore.git'
41
 TOX_BOOTSTRAP_ID_FILE=/var/lib/tox-bootstrapd/pubkey.txt
41
 TOX_BOOTSTRAP_ID_FILE=/var/lib/tox-bootstrapd/pubkey.txt
42
+QTOX_INI='~/.config/tox/qtox.ini'
42
 
43
 
43
 # client or server installations sounds odd for a mesh, but this
44
 # client or server installations sounds odd for a mesh, but this
44
 # indicates whether this is a dedicated mesh peer ("yes") or
45
 # indicates whether this is a dedicated mesh peer ("yes") or
198
         # if this is a valid ID
199
         # if this is a valid ID
199
         if [ ${#PEER_TOX_ID} -gt 30 ]; then
200
         if [ ${#PEER_TOX_ID} -gt 30 ]; then
200
             # start client and make a friend request
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
 /nick $USER
207
 /nick $USER
203
 /add $PEER_TOX_ID
208
 /add $PEER_TOX_ID
204
 /exit
209
 /exit
205
 " | $TOXIC_PATH -d
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
             exit 0
214
             exit 0
209
         else
215
         else
210
             # ID was invalid
216
             # ID was invalid