Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | [Unit] |
| 2 | Description=OpenSSH Key Generation |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 3 | RequiresMountsFor=/var /run |
| 4 | ConditionPathExists=!/var/run/ssh/ssh_host_rsa_key |
| 5 | ConditionPathExists=!/var/run/ssh/ssh_host_dsa_key |
| 6 | ConditionPathExists=!/var/run/ssh/ssh_host_ecdsa_key |
| 7 | ConditionPathExists=!/var/run/ssh/ssh_host_ed25519_key |
| 8 | ConditionPathExists=!/etc/ssh/ssh_host_rsa_key |
| 9 | ConditionPathExists=!/etc/ssh/ssh_host_dsa_key |
| 10 | ConditionPathExists=!/etc/ssh/ssh_host_ecdsa_key |
| 11 | ConditionPathExists=!/etc/ssh/ssh_host_ed25519_key |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | |
| 13 | [Service] |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 14 | Environment="SYSCONFDIR=/etc/ssh" |
| 15 | EnvironmentFile=-/etc/default/ssh |
| 16 | ExecStart=@BASE_BINDIR@/mkdir -p $SYSCONFDIR |
| 17 | ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_rsa_key -N '' -t rsa |
| 18 | ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_dsa_key -N '' -t dsa |
| 19 | ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_ecdsa_key -N '' -t ecdsa |
| 20 | ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_ed25519_key -N '' -t ed25519 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | Type=oneshot |
| 22 | RemainAfterExit=yes |