blob: dfeb17f41d07bfca22bdd42a6a4662612f210e5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
[Unit]
Description=SSH Key Generation
[Service]
# Set the default RSA key path then load environment variables from the
# environment file, which might override the default RSA key path.
Environment="DROPBEAR_RSAKEY_DIR=/etc/dropbear"
EnvironmentFile=-/etc/default/dropbear
Type=oneshot
ExecStart=@BASE_BINDIR@/sh -c \
"if [[ ! -f ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key ]]; then \
@BASE_BINDIR@/mkdir -p ${DROPBEAR_RSAKEY_DIR}; \
@SBINDIR@/dropbearkey -t rsa -f ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key; \
fi"
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
|