mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-17 19:13:13 -04:00
net-misc/tinyssh: Import from ::lanodanOverlay
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
This commit is contained in:
8
net-misc/tinyssh/files/tinyssh-makekey.service
Normal file
8
net-misc/tinyssh/files/tinyssh-makekey.service
Normal file
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=TinySSH Key Generation
|
||||
ConditionPathIsDirectory=!/etc/tinyssh/keys
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/tinysshd-makekey /etc/tinyssh/keys
|
||||
Type=oneshot
|
||||
RemainAfterExit=true
|
||||
7
net-misc/tinyssh/files/tinyssh.confd
Normal file
7
net-misc/tinyssh/files/tinyssh.confd
Normal file
@@ -0,0 +1,7 @@
|
||||
# TinySSH config file for /etc/init.d/tinyssh
|
||||
|
||||
#TINYSSH_PORT="22"
|
||||
#TINYSSH_IP="0.0.0.0"
|
||||
#TINYSSH_CONFDIR="/etc/tinyssh"
|
||||
#TINYSSH_KEYDIR="${TINYSSH_CONFDIR}/keys"
|
||||
#TINYSSH_OPTS="-l -v"
|
||||
30
net-misc/tinyssh/files/tinyssh.initd
Normal file
30
net-misc/tinyssh/files/tinyssh.initd
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
TINYSSH_CONFDIR="${TINYSSH_CONFDIR:-/etc/tinyssh}"
|
||||
TINYSSH_KEYDIR="${TINYSSH_KEYDIR:-${TINYSSH_CONFDIR}/keys}"
|
||||
|
||||
TINYSSHD="/usr/sbin/tinysshd"
|
||||
MAKEKEY="${TINYSSHD}-makekey"
|
||||
PRINTKEY="/usr/bin/tinysshd-printkey"
|
||||
|
||||
command="/usr/bin/tcpserver"
|
||||
command_args="-HRDl0 ${TINYSSH_IP:-0.0.0.0} ${TINYSSH_PORT:-22}
|
||||
${TINYSSHD} ${TINYSSH_OPTS:--l -v} ${TINYSSH_KEYDIR}"
|
||||
command_background=yes
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
start_stop_daemon_args="${SSD_OPTS}"
|
||||
|
||||
depend() {
|
||||
use net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
if [ "${RC_CMD}" != "restart" ]; then
|
||||
checkpath -d "${TINYSSH_CONFDIR}"
|
||||
if ! ${PRINTKEY} "${TINYSSH_KEYDIR}" >/dev/null 2>&1; then
|
||||
${MAKEKEY} "${TINYSSH_KEYDIR}" || return 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
9
net-misc/tinyssh/files/tinyssh.service
Normal file
9
net-misc/tinyssh/files/tinyssh.service
Normal file
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=TinySSH Per-Connection Daemon
|
||||
Documentation=https://tinyssh.org
|
||||
After=tinyssh-makekey.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/tinysshd /etc/tinyssh/keys
|
||||
StandardInput=socket
|
||||
StandardError=journal
|
||||
13
net-misc/tinyssh/files/tinyssh.socket
Normal file
13
net-misc/tinyssh/files/tinyssh.socket
Normal file
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=TinySSH service (socket-activated)
|
||||
Documentation=https://tinyssh.org
|
||||
Wants=tinyssh-makekey.service
|
||||
|
||||
[Socket]
|
||||
ListenStream=%i
|
||||
Accept=true
|
||||
KeepAlive=true
|
||||
IPTOS=low-delay
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
Reference in New Issue
Block a user