4

Is it possible that a single machine running avahi advertises other machines sharing files over afp ?

I have different machines running Gentoo but I don't want to run avahi on each server.

Kami
  • 1,414
  • 12
  • 25

1 Answers1

4

I've found the solution by trying to tune .config files !

/etc/avahi/services/ contains *.services like afpd.services

  • Copy the afpd.servicies to match each machine you want to advertise : server1.service, server2.service, ...

  • Add the <host-name></host-name> tag in each .service

*.service :

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<!-- Customize this to get a different name for your server in the Finder. -->
<name replace-wildcards="yes">MyHostname</name>
<service>
<type>_device-info._tcp</type>
<host-name>myhostname.mydomain.com</host-name>
<port>0</port>
<!-- Customize this to get a different icon in the Finder. -->
<txt-record>model=RackMac</txt-record>
</service>
<service>
<type>_afpovertcp._tcp</type>
<host-name>myhostname.mydomain.com</host-name>
<port>548</port>
</service>
</service-group>

Restart: /etc/init.d/avahi restart

Kami
  • 1,414
  • 12
  • 25