[Unit] | |
Description=Store SSH host keys into /cfg | |
After=netopeer2-keystored-init-keys.service cfg.mount | |
Requires=netopeer2-keystored-init-keys.service cfg.mount | |
ConditionPathExists=!/cfg/etc/keystored/keys | |
[Service] | |
Type=oneshot | |
ExecStartPre=/bin/mkdir -p /cfg/etc/ssh | |
ExecStart=/bin/sh -c 'cp -a /etc/ssh/ssh_host_*_key* /cfg/etc/ssh/' | |
ExecStart=/bin/cp -a /etc/keystored /cfg/etc/ | |
[Install] | |
WantedBy=multi-user.target |