1
1
mirror of https://github.com/OpenVoiceOS/OpenVoiceOS synced 2025-02-24 07:37:49 +01:00
Peter Steenbergen 46d316880f MycroftOS: Addition of hostname-service
This little systemd service adds the last bits of the MAC address
to the hostname for support of multiple MycroftOS's on the same
network.
2020-04-06 10:25:45 +02:00

12 lines
286 B
Desktop File

[Unit]
Description=Set hostname to MycroftOS-[MAC]
Before=systemd-networkd.service
Before=avahi-daemon.service
[Service]
Type=oneshot
ExecStart=/bin/sh -c "hostnamectl set-hostname MycroftOS-`sed 's/://g' /sys/class/net/eth0/address | tail -c 7`"
[Install]
WantedBy=multi-user.target