Browse Source

busybox: use termux_step_install_service_scripts for service scripts

build-on-device
Henrik Grimler 5 years ago
parent
commit
bc82088ce4
  1. 25
      packages/busybox/build.sh

25
packages/busybox/build.sh

@ -8,10 +8,11 @@ TERMUX_PKG_SHA256=d0f940a72f648943c1f2211e0e3117387c31d765137d92bd8284a3fb9752a9
TERMUX_PKG_BUILD_IN_SRC=true TERMUX_PKG_BUILD_IN_SRC=true
# We replace env in the old coreutils package: # We replace env in the old coreutils package:
TERMUX_PKG_CONFLICTS="coreutils (<< 8.25-4)" TERMUX_PKG_CONFLICTS="coreutils (<< 8.25-4)"
TERMUX_PKG_CONFFILES=" TERMUX_PKG_SERVICE_SCRIPT=(
var/service/telnetd/run var/service/telnetd/log/run "telnetd" 'exec busybox telnetd -F'
var/service/ftpd/run var/service/ftpd/log/run "ftpd" 'exec busybox tcpsvd -vE 0.0.0.0 8021 ftpd $HOME'
var/service/crond/run var/service/crond/log/run" "crond" 'exec buxybox crond -f -d 0 2>&1'
)
termux_step_pre_configure() { termux_step_pre_configure() {
# Certain packages are not safe to build on device because their # Certain packages are not safe to build on device because their
@ -74,20 +75,4 @@ termux_step_post_make_install() {
local _CRONTABS=$TERMUX_PREFIX/var/spool/cron/crontabs local _CRONTABS=$TERMUX_PREFIX/var/spool/cron/crontabs
mkdir -p $_CRONTABS mkdir -p $_CRONTABS
echo "Used by the busybox crontab and crond tools" > $_CRONTABS/README.termux echo "Used by the busybox crontab and crond tools" > $_CRONTABS/README.termux
# Setup some services
mkdir -p $TERMUX_PREFIX/var/service
cd $TERMUX_PREFIX/var/service
mkdir -p ftpd/log telnetd/log crond/log
echo "#!$TERMUX_PREFIX/bin/sh" > ftpd/run
echo 'exec busybox tcpsvd -vE 0.0.0.0 8021 ftpd $HOME' >> ftpd/run
echo "#!$TERMUX_PREFIX/bin/sh" > telnetd/run
echo 'exec busybox telnetd -F' >> telnetd/run
echo "#!$TERMUX_PREFIX/bin/sh" > crond/run
echo 'exec crond -f -d 0 2>&1' >> crond/run
chmod +x */run
touch telnetd/down ftpd/down crond/down
ln -sf $TERMUX_PREFIX/share/termux-services/svlogger telnetd/log/run
ln -sf $TERMUX_PREFIX/share/termux-services/svlogger ftpd/log/run
ln -sf $TERMUX_PREFIX/share/termux-services/svlogger crond/log/run
} }

Loading…
Cancel
Save