Browse Source

Use username as default tox nick

Bob Mottram 8 years ago
parent
commit
637cc7610b
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      src/freedombone-app-tox

+ 4
- 2
src/freedombone-app-tox View File

@@ -51,12 +51,14 @@ QTOX_COMMIT='27a628a3789fca4f31516c3982e580052dd3c773'
51 51
 
52 52
 function run_client_tox {
53 53
     # create a tox user
54
-    if [ ! -f /home/${USER}/.config/tox/data.tox ]; then
54
+    USER_TOX_FILE=/home/${USER}/.config/tox/data.tox
55
+    if [ ! -f $USER_TOX_FILE ]; then
55 56
         mkdir -p /home/${USER}/.config/tox
56 57
         chown -R ${USER}:${USER} /home/${USER}/.config
57 58
         toxid -u ${USER} -n data
59
+        toxid --setuser ${USER}
58 60
     fi
59
-    toxic -f /home/${USER}/.config/tox/data.tox --force-tcp --SOCKS5-proxy 127.0.0.1 9050
61
+    toxic -f $USER_TOX_FILE --force-tcp --SOCKS5-proxy 127.0.0.1 9050
60 62
 }
61 63
 
62 64
 function install_interactive_tox {