By default systemd kills the service which causes an OOM. That make sense for a typical service, however, for SSH we don't want this behavior: The connection should continue, just the command which caused OOM should be killed.
13 lines
245 B
Plaintext
13 lines
245 B
Plaintext
[Unit]
|
|
RequiresMountsFor=/etc/dropbear
|
|
ConditionFileNotEmpty=/root/.ssh/authorized_keys
|
|
|
|
[Service]
|
|
Type=forking
|
|
PIDFile=/run/dropbear.pid
|
|
ExecStartPre=
|
|
ExecStart=
|
|
ExecStart=-/usr/sbin/dropbear -R -E -p 22222 -s
|
|
KillMode=mixed
|
|
OOMPolicy=continue
|