Merge pull request #3460 from Neo-Oli/termux-services
Proposal: Termux-Services
This commit is contained in:
commit
b6a636b876
@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://busybox.net/
|
|||||||
TERMUX_PKG_DESCRIPTION="Tiny versions of many common UNIX utilities into a single small executable"
|
TERMUX_PKG_DESCRIPTION="Tiny versions of many common UNIX utilities into a single small executable"
|
||||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||||
TERMUX_PKG_VERSION=1.30.1
|
TERMUX_PKG_VERSION=1.30.1
|
||||||
TERMUX_PKG_REVISION=7
|
TERMUX_PKG_REVISION=8
|
||||||
TERMUX_PKG_SRCURL=https://busybox.net/downloads/busybox-${TERMUX_PKG_VERSION}.tar.bz2
|
TERMUX_PKG_SRCURL=https://busybox.net/downloads/busybox-${TERMUX_PKG_VERSION}.tar.bz2
|
||||||
TERMUX_PKG_SHA256=3d1d04a4dbd34048f4794815a5c48ebb9eb53c5277e09ffffc060323b95dfbdc
|
TERMUX_PKG_SHA256=3d1d04a4dbd34048f4794815a5c48ebb9eb53c5277e09ffffc060323b95dfbdc
|
||||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||||
@ -71,11 +71,14 @@ termux_step_post_make_install() {
|
|||||||
# Setup some services
|
# Setup some services
|
||||||
mkdir -p $TERMUX_PREFIX/var/service
|
mkdir -p $TERMUX_PREFIX/var/service
|
||||||
cd $TERMUX_PREFIX/var/service
|
cd $TERMUX_PREFIX/var/service
|
||||||
mkdir -p ftpd telnetd
|
mkdir -p ftpd/log telnetd/log
|
||||||
echo '#!/bin/sh' > ftpd/run
|
echo '#!/bin/sh' > ftpd/run
|
||||||
echo 'exec busybox tcpsvd -vE 0.0.0.0 8021 ftpd /data/data/com.termux/files/home' >> ftpd/run
|
echo 'exec busybox tcpsvd -vE 0.0.0.0 8021 ftpd /data/data/com.termux/files/home' >> ftpd/run
|
||||||
echo '#!/bin/sh' > telnetd/run
|
echo '#!/bin/sh' > telnetd/run
|
||||||
echo 'exec busybox telnetd -F' >> telnetd/run
|
echo 'exec busybox telnetd -F' >> telnetd/run
|
||||||
chmod +x */run
|
chmod +x */run
|
||||||
|
touch telnetd/down ftpd/down
|
||||||
|
ln -sf $PREFIX/share/termux-services/svlogger telnetd/log/run
|
||||||
|
ln -sf $PREFIX/share/termux-services/svlogger ftpd/log/run
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.openssh.com/
|
|||||||
TERMUX_PKG_DESCRIPTION="Secure shell for logging into a remote machine"
|
TERMUX_PKG_DESCRIPTION="Secure shell for logging into a remote machine"
|
||||||
TERMUX_PKG_LICENSE="BSD"
|
TERMUX_PKG_LICENSE="BSD"
|
||||||
TERMUX_PKG_VERSION=8.0p1
|
TERMUX_PKG_VERSION=8.0p1
|
||||||
TERMUX_PKG_REVISION=1
|
TERMUX_PKG_REVISION=2
|
||||||
TERMUX_PKG_SHA256=bd943879e69498e8031eb6b7f44d08cdc37d59a7ab689aa0b437320c3481fd68
|
TERMUX_PKG_SHA256=bd943879e69498e8031eb6b7f44d08cdc37d59a7ab689aa0b437320c3481fd68
|
||||||
TERMUX_PKG_SRCURL=https://fastly.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${TERMUX_PKG_VERSION}.tar.gz
|
TERMUX_PKG_SRCURL=https://fastly.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${TERMUX_PKG_VERSION}.tar.gz
|
||||||
TERMUX_PKG_DEPENDS="libandroid-support, ldns, openssl, libedit, termux-auth, krb5, zlib"
|
TERMUX_PKG_DEPENDS="libandroid-support, ldns, openssl, libedit, termux-auth, krb5, zlib"
|
||||||
@ -86,6 +86,16 @@ termux_step_post_make_install() {
|
|||||||
|
|
||||||
mkdir -p $TERMUX_PREFIX/etc/ssh/
|
mkdir -p $TERMUX_PREFIX/etc/ssh/
|
||||||
cp $TERMUX_PKG_SRCDIR/moduli $TERMUX_PREFIX/etc/ssh/moduli
|
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 $PREFIX/share/termux-services/svlogger sshd/log/run
|
||||||
}
|
}
|
||||||
|
|
||||||
termux_step_post_massage() {
|
termux_step_post_massage() {
|
||||||
|
9
packages/termux-services/build.sh
Normal file
9
packages/termux-services/build.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
TERMUX_PKG_HOMEPAGE=https://github.com/Neo-Oli/termux-services/
|
||||||
|
TERMUX_PKG_DESCRIPTION="Service daemon for Termux"
|
||||||
|
TERMUX_PKG_VERSION=0.0.3
|
||||||
|
TERMUX_PKG_LICENSE="custom"
|
||||||
|
TERMUX_PKG_SRCURL=https://github.com/termux/termux-services/archive/$TERMUX_PKG_VERSION.tar.gz
|
||||||
|
TERMUX_PKG_SHA256=5cb368761401b26e15529f113c8ce0b8e735fa0e911269fb7476cb8d42223c95
|
||||||
|
TERMUX_PKG_DEPENDS="busybox, coreutils"
|
||||||
|
TERMUX_PKG_PLATFORM_INDEPENDENT=yes
|
||||||
|
TERMUX_PKG_BUILD_IN_SRC=yes
|
7
packages/termux-services/start-services.sh.patch
Normal file
7
packages/termux-services/start-services.sh.patch
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
--- ../start-services.sh.orig 2019-07-27 14:03:44.761403867 +0200
|
||||||
|
+++ ./start-services.sh 2019-07-27 14:01:49.473403949 +0200
|
||||||
|
@@ -1,3 +1,3 @@
|
||||||
|
export SVDIR=$PREFIX/var/service
|
||||||
|
export LOGDIR=$PREFIX/var/log
|
||||||
|
-(termux-services start >/dev/null 2>&1 & )
|
||||||
|
+(service-daemon start >/dev/null 2>&1 & )
|
@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.zsh.org
|
|||||||
TERMUX_PKG_DESCRIPTION="Shell with lots of features"
|
TERMUX_PKG_DESCRIPTION="Shell with lots of features"
|
||||||
TERMUX_PKG_LICENSE="BSD"
|
TERMUX_PKG_LICENSE="BSD"
|
||||||
TERMUX_PKG_VERSION=5.7.1
|
TERMUX_PKG_VERSION=5.7.1
|
||||||
|
TERMUX_PKG_REVISION=1
|
||||||
TERMUX_PKG_SHA256=7260292c2c1d483b2d50febfa5055176bd512b32a8833b116177bf5f01e77ee8
|
TERMUX_PKG_SHA256=7260292c2c1d483b2d50febfa5055176bd512b32a8833b116177bf5f01e77ee8
|
||||||
TERMUX_PKG_SRCURL=https://fossies.org/linux/misc/zsh-${TERMUX_PKG_VERSION}.tar.xz
|
TERMUX_PKG_SRCURL=https://fossies.org/linux/misc/zsh-${TERMUX_PKG_VERSION}.tar.xz
|
||||||
# Remove hard link to bin/zsh as Android does not support hard links:
|
# Remove hard link to bin/zsh as Android does not support hard links:
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
|
. @TERMUX_PREFIX@/etc/profile
|
||||||
command_not_found_handler() {
|
command_not_found_handler() {
|
||||||
@TERMUX_PREFIX@/libexec/termux/command-not-found $1
|
@TERMUX_PREFIX@/libexec/termux/command-not-found $1
|
||||||
}
|
}
|
||||||
|
#set nomatch so *.sh would not error if no file is available
|
||||||
|
setopt +o nomatch
|
||||||
|
. @TERMUX_PREFIX@/etc/profile
|
||||||
PS1='%# '
|
PS1='%# '
|
||||||
|
Loading…
Reference in New Issue
Block a user