From bc82088ce4c79893d04a8ee54038e78a5292ccb6 Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Sun, 5 Jan 2020 15:06:16 +0100 Subject: [PATCH] busybox: use termux_step_install_service_scripts for service scripts --- packages/busybox/build.sh | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/packages/busybox/build.sh b/packages/busybox/build.sh index bdba3ff48..cde6be6c3 100644 --- a/packages/busybox/build.sh +++ b/packages/busybox/build.sh @@ -8,10 +8,11 @@ TERMUX_PKG_SHA256=d0f940a72f648943c1f2211e0e3117387c31d765137d92bd8284a3fb9752a9 TERMUX_PKG_BUILD_IN_SRC=true # We replace env in the old coreutils package: TERMUX_PKG_CONFLICTS="coreutils (<< 8.25-4)" -TERMUX_PKG_CONFFILES=" -var/service/telnetd/run var/service/telnetd/log/run -var/service/ftpd/run var/service/ftpd/log/run -var/service/crond/run var/service/crond/log/run" +TERMUX_PKG_SERVICE_SCRIPT=( + "telnetd" 'exec busybox telnetd -F' + "ftpd" 'exec busybox tcpsvd -vE 0.0.0.0 8021 ftpd $HOME' + "crond" 'exec buxybox crond -f -d 0 2>&1' +) termux_step_pre_configure() { # 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 mkdir -p $_CRONTABS 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 }