Skip to content
Snippets Groups Projects
Commit 55bcf309 authored by Natanael Copa's avatar Natanael Copa
Browse files

community/tinyssh: simplify init.d script

Do not set nice in case of container. It should not make any difference
if you run in container or not.

Split out -openrc subpackage

Do not apk add ucspi-tcp6 if tcpserver is missing. Instead, make it a
hard dependency for tinyssh-openrc.

fixes #9540
parent aef0f021
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......@@ -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
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment