Browse Source

Torify invite code

Bob Mottram 8 years ago
parent
commit
0e89a3fba2
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      src/freedombone-app-scuttlebot

+ 3
- 2
src/freedombone-app-scuttlebot View File

44
                       SYSTEM_TYPE)
44
                       SYSTEM_TYPE)
45
 
45
 
46
 function scuttlebot_create_invite {
46
 function scuttlebot_create_invite {
47
-    invite_string=$(su -c "sbot invite.create 1" - scuttlebot | sed 's/"//g')
47
+    SCUTTLEBOT_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_scuttlebot/hostname)
48
+    invite_string=$(su -c "sbot invite.create 1" - scuttlebot | sed 's/"//g' | sed 's/$DEFAULT_DOMAIN_NAME/$SCUTTLEBOT_ONION_HOSTNAME/g')
48
 
49
 
49
     clear
50
     clear
50
     echo -e '\n\nYour Scuttlebot invite code is:\n\n'${invite_string}'\n\n'
51
     echo -e '\n\nYour Scuttlebot invite code is:\n\n'${invite_string}'\n\n'
233
     fi
234
     fi
234
 
235
 
235
     echo '{' > /etc/scuttlebot/.ssb/config
236
     echo '{' > /etc/scuttlebot/.ssb/config
236
-    echo "  \"host\": \"${SCUTTLEBOT_ONION_HOSTNAME}\"," >> /etc/scuttlebot/.ssb/config
237
+    echo "  \"host\": \"${DEFAULT_DOMAIN_NAME}\"," >> /etc/scuttlebot/.ssb/config
237
     echo "  \"port\": ${SCUTTLEBOT_PORT}," >> /etc/scuttlebot/.ssb/config
238
     echo "  \"port\": ${SCUTTLEBOT_PORT}," >> /etc/scuttlebot/.ssb/config
238
     echo '  "timeout": 30000,' >> /etc/scuttlebot/.ssb/config
239
     echo '  "timeout": 30000,' >> /etc/scuttlebot/.ssb/config
239
     echo '  "pub": true,' >> /etc/scuttlebot/.ssb/config
240
     echo '  "pub": true,' >> /etc/scuttlebot/.ssb/config