homelab/packer/files/archlinux/root/etc/systemd/system/hcloud-hostname.service
2024-03-17 11:07:58 +01:00

12 lines
266 B
Desktop File

[Unit]
Description=Import hcloud hostname
Requires=hcloud-dl-metadata.service
After=hcloud-dl-metadata.service
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'hostnamectl set-hostname $(jq -r .hostname /etc/hcloud-metadata.json)'
[Install]
WantedBy=multi-user.target