Created
May 31, 2021 06:27
-
-
Save andyfangdz/993d438a30ca962b8d24e5cf318f3e63 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# | |
# mdns-publish-cname - Publish CNAMEs pointing to the local host over Avahi/mDNS. | |
# | |
# Copyright (c) 2018, Carlos Rodrigues | |
# | |
from mpublisher import cname_service as command | |
if __name__ == "__main__": | |
command.main() | |
# vim: set expandtab ts=4 sw=4: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ❯ cat /etc/systemd/system/[email protected] | |
[Unit] | |
Description=Publish %I as CNAME via Avahi/mDNS CNAME publisher | |
After=network.target avahi-daemon.service | |
[Service] | |
User=nobody | |
Group=nobody | |
Type=simple | |
WorkingDirectory=/var/empty | |
EnvironmentFile=-/etc/default/mdns-publish-cname | |
ExecStart=/usr/bin/mdns-publish-cname --ttl 20 %i | |
Restart=no | |
PrivateTmp=true | |
PrivateDevices=true | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment