Skip to content

Commit 5810c29

Browse files
committed
initial commit
0 parents  commit 5810c29

17 files changed

+276
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# basic .gitignore file
2+
*~
3+

README.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# avahi service definitions #
2+
3+
## avahi defaults ##
4+
The avahi package includes 2 service definitions "out-of-the-box":
5+
- ssh.service
6+
- sftp-ssh.service
7+
8+
## our additional definitions ##
9+
So far, we've added avahi ".service" (definition) files for the following services:
10+
- domain.service: _domain._udp PORT 53 Domain Name Service server
11+
- epmd-tcp.service: _epmd._tcp PORT 4369 Erlang Port Mapper daemon
12+
- epmd-udp.service: _epmd._udp PORT 4369 Erlang Port Mapper daemon
13+
- kpasswd5-tcp.service: _kpasswd5._tcp PORT 464 Kerberos Password daemon
14+
- kpasswd5-udp.service: _kpasswd5._udp PORT 464 Kerberos Password daemon
15+
- ldap-tcp.service: _ldap._tcp PORT 389 LDAP server
16+
- ldap-udp.service: _ldap._udp PORT 389 LDAP server
17+
- memcached-tcp.service: _memcached._tcp PORT 11211 memcache daemon
18+
- memcached-udp.service: _memcached._udp PORT 11211 memcache daemon
19+
- ntp.service _ntp._udp PORT 123 Network Time Protocol server
20+
- samba.service _smb._tcp PORT 139 Server Message Block daemon
21+
- sunrpc-tcp.service _sunrpc._tcp PORT 111 SUN RPC Port Mapper daemon
22+
- sunrpc-udp.service _sunrpc._udp PORT 111 SUN RPC Port Mapper daemon
23+
24+
## INSTALLATION ##
25+
Obviously, installation procedure will differ by the distribution of Linux/UNIX running on your
26+
box. We will try to provide details for as many distributions as possible, however, some of this
27+
may rely on a volunteer effort.
28+
29+
### FreeBSD 10.3 ###
30+
With the **avahi** package installed from the **FreeBSD Ports Collection**, it's a straightforward
31+
process _(I'd assume the **pkg** is the same)_; it's as simple as copying the *.service files
32+
to their new home:
33+
34+
/usr/local/etc/avahi/services/
35+
36+
Ensure that the **avahi_daemon** service is enabled:
37+
38+
# sysrc avahi_daemon_enable="YES"
39+
40+
And restart it _(unfortunately, it does not have a **restart** command, so we can use **stop** and **start** to acheive the same result)_:
41+
42+
# service avahi-daemon stop
43+
# sleep 5
44+
# service avahi-daemon start
45+
46+
The presence of the newly-advertised services can be verified with **avahi-browse**:
47+
48+
# avahi-browse --all --verbose
49+

domain.service

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3+
<service-group>
4+
5+
<name replace-wildcards="yes">%h</name>
6+
7+
<service>
8+
<type>_domain._udp</type>
9+
<port>53</port>
10+
</service>
11+
12+
</service-group>

epmd-tcp.service

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3+
<service-group>
4+
5+
<name replace-wildcards="yes">%h</name>
6+
7+
<service>
8+
<type>_epmd._tcp</type>
9+
<port>4369</port>
10+
</service>
11+
12+
</service-group>

epmd-udp.service

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3+
<service-group>
4+
5+
<name replace-wildcards="yes">%h</name>
6+
7+
<service>
8+
<type>_epmd._udp</type>
9+
<port>4369</port>
10+
</service>
11+
12+
</service-group>

kpasswd5-tcp.service

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3+
<service-group>
4+
5+
<name replace-wildcards="yes">%h</name>
6+
7+
<service>
8+
<type>_kpasswd5._tcp</type>
9+
<port>464</port>
10+
</service>
11+
12+
</service-group>

kpasswd5-udp.service

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3+
<service-group>
4+
5+
<name replace-wildcards="yes">%h</name>
6+
7+
<service>
8+
<type>_kpasswd5._udp</type>
9+
<port>464</port>
10+
</service>
11+
12+
</service-group>

ldap-tcp.service

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3+
<service-group>
4+
5+
<name replace-wildcards="yes">%h</name>
6+
7+
<service>
8+
<type>_ldap._tcp</type>
9+
<port>389</port>
10+
</service>
11+
12+
</service-group>

ldap-udp.service

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3+
<service-group>
4+
5+
<name replace-wildcards="yes">%h</name>
6+
7+
<service>
8+
<type>_ldap._udp</type>
9+
<port>389</port>
10+
</service>
11+
12+
</service-group>

memcached-tcp.service

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3+
<service-group>
4+
5+
<name replace-wildcards="yes">%h</name>
6+
7+
<service>
8+
<type>_memcached._tcp</type>
9+
<port>11211</port>
10+
</service>
11+
12+
</service-group>

memcached-udp.service

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3+
<service-group>
4+
5+
<name replace-wildcards="yes">%h</name>
6+
7+
<service>
8+
<type>_memcached._udp</type>
9+
<port>11211</port>
10+
</service>
11+
12+
</service-group>

ntp.service

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3+
<service-group>
4+
5+
<name replace-wildcards="yes">%h</name>
6+
7+
<service>
8+
<type>_ntp._udp</type>
9+
<port>123</port>
10+
</service>
11+
12+
</service-group>

samba.service

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3+
<service-group>
4+
5+
<name replace-wildcards="yes">%h</name>
6+
7+
<service>
8+
<type>_smb._tcp</type>
9+
<port>139</port>
10+
</service>
11+
12+
</service-group>

sftp-ssh.service

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3+
4+
<!--
5+
This file is part of avahi.
6+
7+
avahi is free software; you can redistribute it and/or modify it
8+
under the terms of the GNU Lesser General Public License as
9+
published by the Free Software Foundation; either version 2 of the
10+
License, or (at your option) any later version.
11+
12+
avahi is distributed in the hope that it will be useful, but
13+
WITHOUT ANY WARRANTY; without even the implied warranty of
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
General Public License for more details.
16+
17+
You should have received a copy of the GNU Lesser General Public
18+
License along with avahi; if not, write to the Free Software
19+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20+
02111-1307 USA.
21+
-->
22+
23+
<!-- See avahi.service(5) for more information about this configuration file -->
24+
25+
<service-group>
26+
27+
<name replace-wildcards="yes">%h</name>
28+
29+
<service>
30+
<type>_sftp-ssh._tcp</type>
31+
<port>22</port>
32+
</service>
33+
34+
</service-group>

ssh.service

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3+
4+
<!--
5+
This file is part of avahi.
6+
7+
avahi is free software; you can redistribute it and/or modify it
8+
under the terms of the GNU Lesser General Public License as
9+
published by the Free Software Foundation; either version 2 of the
10+
License, or (at your option) any later version.
11+
12+
avahi is distributed in the hope that it will be useful, but
13+
WITHOUT ANY WARRANTY; without even the implied warranty of
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
General Public License for more details.
16+
17+
You should have received a copy of the GNU Lesser General Public
18+
License along with avahi; if not, write to the Free Software
19+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20+
02111-1307 USA.
21+
-->
22+
23+
<!-- See avahi.service(5) for more information about this configuration file -->
24+
25+
<service-group>
26+
27+
<name replace-wildcards="yes">%h</name>
28+
29+
<service>
30+
<type>_ssh._tcp</type>
31+
<port>22</port>
32+
</service>
33+
34+
</service-group>

sunrpc-tcp.service

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3+
<service-group>
4+
5+
<name replace-wildcards="yes">%h</name>
6+
7+
<service>
8+
<type>_sunrpc._tcp</type>
9+
<port>111</port>
10+
</service>
11+
12+
</service-group>

sunrpc-udp.service

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3+
<service-group>
4+
5+
<name replace-wildcards="yes">%h</name>
6+
7+
<service>
8+
<type>_sunrpc._udp</type>
9+
<port>111</port>
10+
</service>
11+
12+
</service-group>

0 commit comments

Comments
 (0)