|
@@ -78,7 +78,9 @@ TOX_USERS_FILE=$ZERONET_INSTALL/${PROJECT_NAME}-tox-users.html
|
78
|
78
|
# whether to enable zeronet
|
79
|
79
|
ENABLE_ZERONET=
|
80
|
80
|
|
81
|
|
-function create_avahi_service {
|
|
81
|
+IPFS_PORT=4001
|
|
82
|
+
|
|
83
|
+function create_avahi_mesh_service {
|
82
|
84
|
service_name=$1
|
83
|
85
|
service_type=$2
|
84
|
86
|
service_protocol=$3
|
|
@@ -86,7 +88,7 @@ function create_avahi_service {
|
86
|
88
|
service_description="$5"
|
87
|
89
|
|
88
|
90
|
if [ ! -d /etc/avahi ]; then
|
89
|
|
- echo $'create_avahi_service: avahi was not installed'
|
|
91
|
+ echo $'create_avahi_mesh_service: avahi was not installed'
|
90
|
92
|
exit 52925
|
91
|
93
|
fi
|
92
|
94
|
|
|
@@ -97,9 +99,7 @@ function create_avahi_service {
|
97
|
99
|
echo ' <service>' >> /etc/avahi/services/${service_name}.service
|
98
|
100
|
echo " <type>_${service_type}._${service_protocol}</type>" >> /etc/avahi/services/${service_name}.service
|
99
|
101
|
echo " <port>${service_port}</port>" >> /etc/avahi/services/${service_name}.service
|
100
|
|
- if [ "$service_description" ]; then
|
101
|
|
- echo " <txt-record>$service_description</txt-record>" >> /tmp/zeronet-blog.service
|
102
|
|
- fi
|
|
102
|
+ echo " <txt-record>$service_description</txt-record>" >> /etc/avahi/services/${service_name}.service
|
103
|
103
|
echo ' </service>' >> /etc/avahi/services/${service_name}.service
|
104
|
104
|
echo '</service-group>' >> /etc/avahi/services/${service_name}.service
|
105
|
105
|
}
|
|
@@ -814,9 +814,9 @@ function setup_ipfs {
|
814
|
814
|
fi
|
815
|
815
|
|
816
|
816
|
TOX_ID=$(su -c 'toxid' - $MY_USERNAME)
|
817
|
|
- create_avahi_service ipfs "ipfs" udp $IPFS_PORT "${IPFS_PEER_ID}:${TOX_ID}"
|
|
817
|
+ create_avahi_mesh_service "ipfs" "ipfs" "udp" "$IPFS_PORT" "${IPFS_PEER_ID}:${TOX_ID}"
|
818
|
818
|
|
819
|
|
- echo 'IPFS installed with ID $IPFS_PEER_ID' >> $INSTALL_LOG
|
|
819
|
+ echo "IPFS installed with ID ${IPFS_PEER_ID}" >> $INSTALL_LOG
|
820
|
820
|
}
|
821
|
821
|
|
822
|
822
|
function setup_tahoelafs {
|