aboutsummaryrefslogtreecommitdiffstats
path: root/community/tinyssh/tinyssh.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-10-09 12:33:52 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-10-09 12:37:46 +0000
commit55bcf3093d9c1973fc3e0685bb7feb86af68a572 (patch)
tree022f3dbfea7ac80cf90fcd403bc6448406c38478 /community/tinyssh/tinyssh.initd
parentaef0f0212556536202a3f40fa831bfe9c80cefd6 (diff)
downloadaports-55bcf3093d9c1973fc3e0685bb7feb86af68a572.tar.bz2
aports-55bcf3093d9c1973fc3e0685bb7feb86af68a572.tar.xz
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
Diffstat (limited to 'community/tinyssh/tinyssh.initd')
-rw-r--r--community/tinyssh/tinyssh.initd20
1 files changed, 1 insertions, 19 deletions
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
}