blob: 76f620e04f8f22e5bb9a4d2fb480cdfb5ba239b4 [file] [log] [blame]
Jan Kundrátd7e9cea2018-05-24 18:02:46 +02001[Unit]
2Description=Store SSH host keys into /cfg
Jan Kundrátd595c952018-08-22 19:17:31 +02003After=netopeer2-keystored-init-keys.service cfg.mount
4Requires=netopeer2-keystored-init-keys.service cfg.mount
Jan Kundrátd7e9cea2018-05-24 18:02:46 +02005ConditionPathExists=!/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