diff options
-rw-r--r-- | community/tinyssh/APKBUILD | 13 | ||||
-rw-r--r-- | community/tinyssh/tinyssh.initd | 20 |
2 files changed, 11 insertions, 22 deletions
diff --git a/community/tinyssh/APKBUILD b/community/tinyssh/APKBUILD index 56606173aa..341699a4eb 100644 --- a/community/tinyssh/APKBUILD +++ b/community/tinyssh/APKBUILD @@ -2,14 +2,15 @@ # Maintainer: Stuart Cardall <developer@it-offshore.co.uk> pkgname=tinyssh pkgver=20180201 -pkgrel=0 +pkgrel=1 pkgdesc="Small SSH server using NaCl / TweetNaCl (no dependency on OpenSSL)" url="https://tinyssh.org/" arch="all" license="CC0-1.0" +_openrc_deps="ucspi-tcp6" makedepends="libsodium-dev" options="!check" -subpackages="$pkgname-doc" +subpackages="$pkgname-doc $pkgname-openrc" source="$pkgname-$pkgver.tar.gz::https://github.com/janmojzis/$pkgname/archive/$pkgver.tar.gz $pkgname.initd $pkgname.confd @@ -57,6 +58,12 @@ Stealth SSH with FWKNOP: https://it-offshore.co.uk/security/53-stealth-your-ssh- EOF } + +openrc() { + default_openrc + depends="$_openrc_deps" +} + sha512sums="fa0e0245168fc0549fa6db807106e0b3c51be479498de6bb4ced714e2bb156613447333ed034e00d8c24dd79411f632174f0d8f5b1cf2f1d26c77dd5515971e8 tinyssh-20180201.tar.gz -4bba2c283e1c266734d26647b4c400c2fce258cd9957b41f637a5e875ce995b4cdef9eeea147178174facc311fc6e23a6ebcf10b05fb75222582605dc9b1fde5 tinyssh.initd +99ed9a43bf92db8318c001d287ebf52f36f377ddcd6702cfc9e1331435834ce4a0c5804fafbdeaf9beadd5c8ac828d17cedd19128c74f7bfe737b129b57e196b tinyssh.initd 7c6282a6ae972d83d3e624530cac4958adee1e2313d0e44aff38c94bde1a3f549a536ec80e594d44c29a6a981919dd30322e8d8511626fdb6493c98587047392 tinyssh.confd" diff --git a/community/tinyssh/tinyssh.initd b/community/tinyssh/tinyssh.initd index 5671855176..49225d2fce 100644 --- a/community/tinyssh/tinyssh.initd +++ b/community/tinyssh/tinyssh.initd @@ -6,7 +6,6 @@ supervisor=supervise-daemon description="Small SSH server using NaCl (no dependency on OpenSSL)" -nice="0" pidfile="/run/tinysshd.sd.pid" supervise_daemon_args="" @@ -28,24 +27,7 @@ depend() { after logger firewall } -in_contr() { - grep "container=" /proc/1/environ -} - start_pre() { checkpath --directory ${CONFDIR} - eval $keygen $keydir 2>/dev/null - - if [ -z "$(in_contr)" ]; then - supervise_daemon_args="$supervise_daemon_args -N $nice" - fi - - # tinyssh also runs from inetd without tcpserver - if [ ! -x /usr/bin/tcpserver ]; then - # openrc does not use proxy environment by default - if [ -f "$proxy_env" ]; then - . $proxy_env - fi - apk add ucspi-tcp6 - fi + $keygen $keydir 2>/dev/null } |