2013-09-04 11:04:59 +00:00
|
|
|
[Unit]
|
2014-01-17 03:03:22 +00:00
|
|
|
Description=OpenSSH Key Generation
|
2015-09-30 12:53:16 +00:00
|
|
|
RequiresMountsFor=/var /run
|
|
|
|
ConditionPathExists=!/var/run/ssh/ssh_host_rsa_key
|
|
|
|
ConditionPathExists=!/var/run/ssh/ssh_host_dsa_key
|
|
|
|
ConditionPathExists=!/var/run/ssh/ssh_host_ecdsa_key
|
|
|
|
ConditionPathExists=!/var/run/ssh/ssh_host_ed25519_key
|
|
|
|
ConditionPathExists=!/etc/ssh/ssh_host_rsa_key
|
|
|
|
ConditionPathExists=!/etc/ssh/ssh_host_dsa_key
|
|
|
|
ConditionPathExists=!/etc/ssh/ssh_host_ecdsa_key
|
|
|
|
ConditionPathExists=!/etc/ssh/ssh_host_ed25519_key
|
2013-09-04 11:04:59 +00:00
|
|
|
|
|
|
|
[Service]
|
2015-09-30 12:53:16 +00:00
|
|
|
Environment="SYSCONFDIR=/etc/ssh"
|
|
|
|
EnvironmentFile=-/etc/default/ssh
|
|
|
|
ExecStart=@BASE_BINDIR@/mkdir -p $SYSCONFDIR
|
|
|
|
ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_rsa_key -N '' -t rsa
|
|
|
|
ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_dsa_key -N '' -t dsa
|
|
|
|
ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_ecdsa_key -N '' -t ecdsa
|
|
|
|
ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_ed25519_key -N '' -t ed25519
|
2013-09-04 11:04:59 +00:00
|
|
|
Type=oneshot
|
|
|
|
RemainAfterExit=yes
|