Simple conf.based avahi-alias service.
This is for linux systems that use avahi-daemon. This script requires avahi-publish
which is part of the avahi-utils
package, which can be installed by running the following on Debian-based disros:
apt install avahi-utils
Copy the service file:
sudo cp [email protected] /etc/systemd/system
Change permissions and owner:
sudo chown root:root /etc/systemd/system/[email protected]
sudo chmod 644 /etc/systemd/system/[email protected]
Reload systemd to make the new service available:
sudo systemctl daemon-reload
Setting up and removing aliases is as simple as the following:
systemctl enable --now [email protected]
systemctl disable [email protected]