Jan Kundrát | d7e9cea | 2018-05-24 18:02:46 +0200 | [diff] [blame^] | 1 | [Unit] |
2 | Description=Store SSH host keys into /cfg | ||||
3 | After=netopeer2-keystored-init-keys.service | ||||
4 | Requires=netopeer2-keystored-init-keys.service | ||||
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 |