distribution/packages/network/openssh/system.d/sshd.service

22 lines
627 B
SYSTEMD
Raw Normal View History

2022-02-05 14:23:32 +00:00
[Unit]
Description=OpenSSH server daemon
After=network.target
2022-02-05 14:23:32 +00:00
ConditionKernelCommandLine=|ssh
ConditionPathExists=|/storage/.cache/services/sshd.conf
[Service]
Restart=on-failure
EnvironmentFile=-/storage/.cache/services/sshd.conf
ExecStartPre=-/bin/sh -c 'mkdir -p /storage/.cache/ssh'
ExecStartPre=/usr/bin/ssh-keygen -A
ExecStartPre=-/bin/sh -c 'chmod 600 /storage/.cache/ssh/ssh_host_*'
ExecStartPre=-/bin/sh -c 'chmod 644 /storage/.cache/ssh/ssh_host_*.pub'
ExecStart=/usr/sbin/sshd -D $SSH_ARGS
ExecReload=/bin/kill -HUP $MAINPID
TimeoutStopSec=1s
RestartSec=2
StartLimitInterval=0
[Install]
WantedBy=multi-user.target