Browse Source

Use a separate port for scuttlebot on the mesh

Bob Mottram 7 years ago
parent
commit
fe6495c2a2
2 changed files with 4 additions and 28 deletions
  1. 1
    0
      src/freedombone-app-scuttlebot
  2. 3
    28
      src/freedombone-image-mesh

+ 1
- 0
src/freedombone-app-scuttlebot View File

37
 
37
 
38
 SCUTTLEBOT_VERSION='10.4.6'
38
 SCUTTLEBOT_VERSION='10.4.6'
39
 SCUTTLEBOT_PORT=8008
39
 SCUTTLEBOT_PORT=8008
40
+SCUTTLEBOT_MESH_PORT=8010
40
 
41
 
41
 scuttlebot_variables=(MY_USERNAME
42
 scuttlebot_variables=(MY_USERNAME
42
                       DEFAULT_DOMAIN_NAME
43
                       DEFAULT_DOMAIN_NAME

+ 3
- 28
src/freedombone-image-mesh View File

83
 VPN_TLS_PORT=553
83
 VPN_TLS_PORT=553
84
 VPN_MESH_TLS_PORT=653
84
 VPN_MESH_TLS_PORT=653
85
 
85
 
86
+SCUTTLEBOT_MESH_PORT=8010
87
+
86
 # Debian stretch has a problem where the formerly predictable wlan0 and eth0
88
 # Debian stretch has a problem where the formerly predictable wlan0 and eth0
87
 # device names get assigned random names. This is a hacky workaround.
89
 # device names get assigned random names. This is a hacky workaround.
88
 # Also adding net.ifnames=0 to kernel options on bootloader may work.
90
 # Also adding net.ifnames=0 to kernel options on bootloader may work.
790
 
792
 
791
     echo '{' > /etc/scuttlebot/.ssb/config
793
     echo '{' > /etc/scuttlebot/.ssb/config
792
     echo "  \"host\": \"${HOSTNAME}\"," >> /etc/scuttlebot/.ssb/config
794
     echo "  \"host\": \"${HOSTNAME}\"," >> /etc/scuttlebot/.ssb/config
793
-    echo "  \"port\": 8008," >> /etc/scuttlebot/.ssb/config
795
+    echo "  \"port\": ${SCUTTLEBOT_MESH_PORT}," >> /etc/scuttlebot/.ssb/config
794
     echo '  "timeout": 30000,' >> /etc/scuttlebot/.ssb/config
796
     echo '  "timeout": 30000,' >> /etc/scuttlebot/.ssb/config
795
     echo '  "pub": true,' >> /etc/scuttlebot/.ssb/config
797
     echo '  "pub": true,' >> /etc/scuttlebot/.ssb/config
796
     echo '  "local": true,' >> /etc/scuttlebot/.ssb/config
798
     echo '  "local": true,' >> /etc/scuttlebot/.ssb/config
810
     systemctl restart scuttlebot.service
812
     systemctl restart scuttlebot.service
811
 }
813
 }
812
 
814
 
813
-function add_ssb_icons {
814
-    if [ ! -d /home/$MY_USERNAME/Desktop ]; then
815
-        return
816
-    fi
817
-
818
-    echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/social.desktop
819
-    echo 'Name=Social (Offline)' >> /home/$MY_USERNAME/Desktop/social.desktop
820
-    echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/social.desktop
821
-    echo 'Comment=A decentralized messaging and sharing app built on top of Secure Scuttlebutt (SSB)' >> /home/$MY_USERNAME/Desktop/social.desktop
822
-    echo 'Exec=bash /usr/bin/start_patchwork' >> /home/$MY_USERNAME/Desktop/social.desktop
823
-    echo "Icon=/etc/patchwork/icon_patchwork.png" >> /home/$MY_USERNAME/Desktop/social.desktop
824
-    echo 'StartupNotify=true' >> /home/$MY_USERNAME/Desktop/social.desktop
825
-    chmod +x /home/$MY_USERNAME/Desktop/social.desktop
826
-    chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/social.desktop
827
-
828
-    echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/audio.desktop
829
-    echo 'Name=Audio/Music (Offline)' >> /home/$MY_USERNAME/Desktop/audio.desktop
830
-    echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/audio.desktop
831
-    echo 'Comment=Audio publishing and streaming' >> /home/$MY_USERNAME/Desktop/audio.desktop
832
-    echo 'Exec=bash /usr/bin/start_ferment' >> /home/$MY_USERNAME/Desktop/audio.desktop
833
-    echo "Icon=/etc/patchwork/icon_ferment.png" >> /home/$MY_USERNAME/Desktop/audio.desktop
834
-    echo 'StartupNotify=true' >> /home/$MY_USERNAME/Desktop/audio.desktop
835
-    chmod +x /home/$MY_USERNAME/Desktop/audio.desktop
836
-    chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/audio.desktop
837
-}
838
-
839
 # whether to reset the identity
815
 # whether to reset the identity
840
 set_new_identity=
816
 set_new_identity=
841
 if [ $2 ]; then
817
 if [ $2 ]; then
899
     #setup_tahoelafs
875
     #setup_tahoelafs
900
     mesh_setup_vpn
876
     mesh_setup_vpn
901
     initialise_scuttlebot_pub
877
     initialise_scuttlebot_pub
902
-    add_ssb_icons
903
     setup_ipfs
878
     setup_ipfs
904
     mesh_amnesic
879
     mesh_amnesic
905
     make_root_read_only
880
     make_root_read_only