项目作者: Dalee

项目描述 :
Add CNAME host aliases to local Avahi daemon
高级语言: Python
项目地址: git://github.com/Dalee/avahi-cname-aliases.git
创建时间: 2017-01-12T12:19:46Z
项目社区:https://github.com/Dalee/avahi-cname-aliases

开源协议:The Unlicense

下载


Avahi Aliases (CNAME)

Add CNAME aliases to current Avahi host.

Dependencies:

  • Python 2.7
  • python-avahi, python-pip

Installation

  1. # apt-get install -y python-avahi python-pip
  2. # pip install --upgrade git+https://github.com/Dalee/avahi-cname-aliases.git

Systemd configuration

  1. [Unit]
  2. Description=Avahi Aliases stack
  3. Requires=avahi-daemon.service
  4. After=avahi-daemon.service
  5. [Service]
  6. ExecStart=/usr/local/bin/avahi-cname-aliases
  7. [Install]
  8. WantedBy=multi-user.target
  1. # systemctl daemon-reload
  2. # systemctl enable avahi-aliases
  3. # systemctl start avahi-aliases

Set aliases

  1. # mkdir /etc/avahi/aliases.d
  2. # echo "hello.local" > /etc/avahi/aliases.d/hello.txt
  3. # systemctl restart avahi-aliases

Common pitfalls

Avahi allows 32 CNAME aliases per group.

In order to increase this value just tune entries-per-entry-group-max
value of /etc/avahi/avahi-daemon.conf.

License

Code is unlicensed. Do whatever you want with it. Set Your Code Free.