openssh: use termux_step_install_service_scripts for service script

This also fixes faulty shebang (#!/bin/sh) in service script
This commit is contained in:
Henrik Grimler 2020-01-05 15:13:15 +01:00
parent 15594b93e1
commit f4a4f86316
1 changed files with 3 additions and 12 deletions

View File

@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.openssh.com/
TERMUX_PKG_DESCRIPTION="Secure shell for logging into a remote machine"
TERMUX_PKG_LICENSE="BSD"
TERMUX_PKG_VERSION=8.1p1
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://fastly.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=02f5dbef3835d0753556f973cd57b4c19b6b1f6cd24c03445e23ac77ca1b93ff
TERMUX_PKG_DEPENDS="libandroid-support, ldns, openssl, libedit, termux-auth, krb5, zlib"
@ -41,7 +41,8 @@ ac_cv_func_bzero=yes
"
TERMUX_PKG_MAKE_INSTALL_TARGET="install-nokeys"
TERMUX_PKG_RM_AFTER_INSTALL="bin/slogin share/man/man1/slogin.1"
TERMUX_PKG_CONFFILES="etc/ssh/ssh_config etc/ssh/sshd_config var/service/sshd/run var/service/sshd/log/run"
TERMUX_PKG_CONFFILES="etc/ssh/ssh_config etc/ssh/sshd_config"
TERMUX_PKG_SERVICE_SCRIPT=("sshd" 'exec sshd -D -e 2>&1')
termux_step_pre_configure() {
# Certain packages are not safe to build on device because their
@ -83,16 +84,6 @@ termux_step_post_make_install() {
mkdir -p $TERMUX_PREFIX/etc/ssh/
cp $TERMUX_PKG_SRCDIR/moduli $TERMUX_PREFIX/etc/ssh/moduli
# Setup sshd services
mkdir -p $TERMUX_PREFIX/var/service
cd $TERMUX_PREFIX/var/service
mkdir -p sshd/log
echo '#!/bin/sh' > sshd/run
echo 'exec sshd -D -e 2>&1' >> sshd/run
chmod +x sshd/run
touch sshd/down
ln -sf $TERMUX_PREFIX/share/termux-services/svlogger sshd/log/run
}
termux_step_post_massage() {