blob: 177c247d4b2c2a0a02e7702a6e885fb7f12ac2f0 [file] [log] [blame]
Jan Kundrátd7e9cea2018-05-24 18:02:46 +02001[Unit]
2Description=Store SSH host keys into /cfg
3After=netopeer2-keystored-init-keys.service
4Requires=netopeer2-keystored-init-keys.service
5ConditionPathExists=!/cfg/etc/keystored/keys
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/'
11ExecStart=/bin/cp -a /etc/keystored /cfg/etc/
12
13[Install]
14WantedBy=multi-user.target