blob: 48e9bd30e03931403162e931f332b86a9baa33f0 [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
Jan Kundrát89297822021-01-19 21:48:52 +01009RemainAfterExit=yes
Jan Kundrát1e5dfeb2018-09-14 13:40:34 +020010ExecStartPre=/bin/mkdir -p /cfg/etc/ssh
11ExecStart=/bin/sh -c 'cp -a /etc/ssh/ssh_host_*_key* /cfg/etc/ssh/'
12
13[Install]
14WantedBy=multi-user.target