Git Product home page Git Product logo

avahi-alias's Introduction

Avahi-Alias

There are currently no configuration options to set up CNAME mDNS entries with avahi-daemon. These scripts are an adaption of the script at http://www.avahi.org/wiki/Examples/PythonPublishAlias with the following modification:

  • Turn the script into a daemon with a debian init script.
  • This adaption checks the services every 60 seconds for any new CNAMES to be configured.

Installation

  1. Copy avahi-alias to /usr/sbin/avahi-alias.
  2. Copy avahi-alias.init to /etc/init.d/avahi-alias
  3. Configure your services to allow CNAME's to be configured by this script. See Usage below.
  4. Enable the init script with 1.1. /usr/sbin/invoke-rc.d avahi-alias defaults

Usage

The script parses all the existing services every 60 seconds to configure CNAME's. You'll need to make sure your services are configured with an additional field with _cname in the string.

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
	<name replace-wildcards="yes">HAProxy: <%= @domain %> (%h)</name>
	<service>
		<type>_http._tcp</type>
		*<subtype>_cname._http._tcp</subtype>*
		<host-name><%= @domain %></host-name>
		<port><%= @port %></port>
	</service>
</service-group>

Motivation

This script is to inject the equivalent of domain CNAME resource records into local DNS-SD records for entries. This allows multiple hostname to resolve to the current host. The need for this is because avahi.hosts will automatically filter out name collisions, and there's currently no means for adding these values through existing service configuration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.