From 6965ea16c63000a95e0b1395a49ae124b4dcdde5 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 4 Jul 2019 14:16:16 +0700 Subject: [PATCH] openssh: add runit services --- extra/openssh/build | 4 ++++ extra/openssh/checksums | 1 + extra/openssh/files/sshd.run | 4 ++++ extra/openssh/sources | 1 + 4 files changed, 10 insertions(+) create mode 100644 extra/openssh/files/sshd.run diff --git a/extra/openssh/build b/extra/openssh/build index 797b3b86..cdd68702 100755 --- a/extra/openssh/build +++ b/extra/openssh/build @@ -19,3 +19,7 @@ make DESTDIR="$1" install install -m 755 contrib/ssh-copy-id "$1/usr/bin/ssh-copy-id" install -m 644 contrib/ssh-copy-id.1 "$1/usr/share/man/man8/ssh-copy-id.1" + +# Install runit services. +install -Dm 755 sshd.run "$1/etc/sv/sshd/run" +ln -s /run/runit/supervise.sshd "$1/etc/sv/sshd/supervise" diff --git a/extra/openssh/checksums b/extra/openssh/checksums index 16b7b941..cae4750b 100644 --- a/extra/openssh/checksums +++ b/extra/openssh/checksums @@ -1 +1,2 @@ bd943879e69498e8031eb6b7f44d08cdc37d59a7ab689aa0b437320c3481fd68 openssh-8.0p1.tar.gz +220dde8d4495bab6f08e063860c0ad54cc70ef8b7913a00e27126f1d5eb0af5f sshd.run diff --git a/extra/openssh/files/sshd.run b/extra/openssh/files/sshd.run new file mode 100644 index 00000000..b5e744a6 --- /dev/null +++ b/extra/openssh/files/sshd.run @@ -0,0 +1,4 @@ +#!/bin/sh +ssh-keygen -A >/dev/null 2>&1 # Will generate host keys if they don't already exist +[ -r conf ] && . ./conf +exec /usr/bin/sshd -D $OPTS diff --git a/extra/openssh/sources b/extra/openssh/sources index 3b2315b0..59c028b8 100644 --- a/extra/openssh/sources +++ b/extra/openssh/sources @@ -1 +1,2 @@ https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.0p1.tar.gz +files/sshd.run