diff --git a/src/freedombone b/src/freedombone index 916cdcfe..732c399b 100755 --- a/src/freedombone +++ b/src/freedombone @@ -1658,11 +1658,37 @@ function configure_avahi { sed -i "s|#host-name=.*|host-name=mesh-$PEER_ID|g" /etc/avahi/avahi-daemon.conf fi + if [ ! -d /etc/avahi/services ]; then + mkdir -p /etc/avahi/services + fi + # remove an avahi service which isn't used if [ -f /etc/avahi/services/udisks.service ]; then rm /etc/avahi/services/udisks.service fi + # Add an ssh service + echo '' > /etc/avahi/services/ssh.service + echo '' >> /etc/avahi/services/ssh.service + echo '' >> /etc/avahi/services/ssh.service + echo '%h SSH' >> /etc/avahi/services/ssh.service + echo '' >> /etc/avahi/services/ssh.service + echo '_ssh._tcp' >> /etc/avahi/services/ssh.service + echo "$SSH_PORT" >> /etc/avahi/services/ssh.service + echo '' >> /etc/avahi/services/ssh.service + echo '' >> /etc/avahi/services/ssh.service + + # Add an irc service + echo '' > /etc/avahi/services/irc.service + echo '' >> /etc/avahi/services/irc.service + echo '' >> /etc/avahi/services/irc.service + echo '%h IRC' >> /etc/avahi/services/irc.service + echo '' >> /etc/avahi/services/irc.service + echo '_irc._tcp' >> /etc/avahi/services/irc.service + echo "6697" >> /etc/avahi/services/irc.service + echo '' >> /etc/avahi/services/irc.service + echo '' >> /etc/avahi/services/irc.service + systemctl restart avahi-daemon echo 'configure_avahi' >> $COMPLETION_FILE }