blob: d75b6160172b331ef441700b4ce80766da8e2f6f [file] [log] [blame]
Jan Kundrát1e5dfeb2018-09-14 13:40:34 +02001[Unit]
2Description=Store OpenSSH host keys into /cfg
3After=cfg.mount sshd.service
4Requires=cfg.mount sshd.service
5ConditionPathExists=!/cfg/etc/ssh/ssh_host_rsa_key
6
7[Service]
8Type=oneshot
9ExecStartPre=/bin/mkdir -p /cfg/etc/ssh
10ExecStart=/bin/sh -c 'cp -a /etc/ssh/ssh_host_*_key* /cfg/etc/ssh/'
11
12[Install]
13WantedBy=multi-user.target