Jan Kundrát | d7e9cea | 2018-05-24 18:02:46 +0200 | [diff] [blame] | 1 | [Unit] |
| 2 | Description=Store SSH host keys into /cfg |
Jan Kundrát | d595c95 | 2018-08-22 19:17:31 +0200 | [diff] [blame] | 3 | After=netopeer2-keystored-init-keys.service cfg.mount |
| 4 | Requires=netopeer2-keystored-init-keys.service cfg.mount |
Jan Kundrát | d7e9cea | 2018-05-24 18:02:46 +0200 | [diff] [blame] | 5 | ConditionPathExists=!/cfg/etc/keystored/keys |
| 6 | |
| 7 | [Service] |
| 8 | Type=oneshot |
| 9 | ExecStartPre=/bin/mkdir -p /cfg/etc/ssh |
| 10 | ExecStart=/bin/sh -c 'cp -a /etc/ssh/ssh_host_*_key* /cfg/etc/ssh/' |
| 11 | ExecStart=/bin/cp -a /etc/keystored /cfg/etc/ |
| 12 | |
| 13 | [Install] |
| 14 | WantedBy=multi-user.target |