15 lines
367 B
Desktop File
15 lines
367 B
Desktop File
[Unit]
|
|
Description=Import hcloud root ssh keys
|
|
Requires=hcloud-dl-metadata.service
|
|
After=hcloud-dl-metadata.service
|
|
ConditionPathExists=!/root/.ssh/authorized_keys
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
DynamicUser=yes
|
|
ExecStart=/usr/bin/jq -r '.ssh_keys|join("\n")' /etc/hcloud-metadata.json
|
|
StandardOutput=truncate:/root/.ssh/authorized_keys
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|