diff --git a/src/freedombone-image-mesh b/src/freedombone-image-mesh index 80a59a0f..041fd481 100755 --- a/src/freedombone-image-mesh +++ b/src/freedombone-image-mesh @@ -78,7 +78,9 @@ TOX_USERS_FILE=$ZERONET_INSTALL/${PROJECT_NAME}-tox-users.html # whether to enable zeronet ENABLE_ZERONET= -function create_avahi_service { +IPFS_PORT=4001 + +function create_avahi_mesh_service { service_name=$1 service_type=$2 service_protocol=$3 @@ -86,7 +88,7 @@ function create_avahi_service { service_description="$5" if [ ! -d /etc/avahi ]; then - echo $'create_avahi_service: avahi was not installed' + echo $'create_avahi_mesh_service: avahi was not installed' exit 52925 fi @@ -97,9 +99,7 @@ function create_avahi_service { echo ' ' >> /etc/avahi/services/${service_name}.service echo " _${service_type}._${service_protocol}" >> /etc/avahi/services/${service_name}.service echo " ${service_port}" >> /etc/avahi/services/${service_name}.service - if [ "$service_description" ]; then - echo " $service_description" >> /tmp/zeronet-blog.service - fi + echo " $service_description" >> /etc/avahi/services/${service_name}.service echo ' ' >> /etc/avahi/services/${service_name}.service echo '' >> /etc/avahi/services/${service_name}.service } @@ -814,9 +814,9 @@ function setup_ipfs { fi TOX_ID=$(su -c 'toxid' - $MY_USERNAME) - create_avahi_service ipfs "ipfs" udp $IPFS_PORT "${IPFS_PEER_ID}:${TOX_ID}" + create_avahi_mesh_service "ipfs" "ipfs" "udp" "$IPFS_PORT" "${IPFS_PEER_ID}:${TOX_ID}" - echo 'IPFS installed with ID $IPFS_PEER_ID' >> $INSTALL_LOG + echo "IPFS installed with ID ${IPFS_PEER_ID}" >> $INSTALL_LOG } function setup_tahoelafs {