12 lines
284 B
SYSTEMD
12 lines
284 B
SYSTEMD
[Unit]
|
|
Description=Set hostname to MycroftOS-[MAC]
|
|
Before=NetworkManager.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
|