openssh: add systemd unit file
PATCH v5 1/1 openssh: add systemd unit file
And only install sysV-style script when appropiate.
Signed-off-by Gustavo Zacarias <[email protected]>
--- package/openssh/openssh.mk | 13 ++++++++++--- package/openssh/sshd.service | 11 +++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 package/openssh/sshd.service
package/openssh/openssh.mk +10 -3
@@ -17,10 +17,17 @@ OPENSSH_DEPENDENCIES += linux-pam OPENSSH_CONF_OPT += --with-pam endif -define OPENSSH_INSTALL_INITSCRIPT - $(INSTALL) -D -m 755 package/openssh/S50sshd $(TARGET_DIR)/etc/init.d/S50sshd +define OPENSSH_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/openssh/sshd.service \ + $(TARGET_DIR)/etc/systemd/system/sshd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../sshd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/sshd.service endef -OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_INITSCRIPT +define OPENSSH_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/openssh/S50sshd \ + $(TARGET_DIR)/etc/init.d/S50sshd +endef $(eval $(autotools-package))
package/openssh/sshd.service new file +11 -0
@@ -0,0 +1,11 @@ +[Unit] +Description=OpenSSH server daemon +After=syslog.target network.target auditd.service + +[Service] +ExecStartPre=/usr/bin/ssh-keygen -A +ExecStart=/usr/sbin/sshd -D -e +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target
Signature · 1 line
1.8.3.2
PATCH v5 1/1 openssh: add systemd unit file
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Gustavo" == Gustavo Zacarias <[email protected]> writes:
And only install sysV-style script when appropiate.
Signed-off-by Gustavo Zacarias <[email protected]>---
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard