From 5ea9aa6ab834e26e1e15dfedb688328292831390 Mon Sep 17 00:00:00 2001 From: Oliver Schmidhauser Date: Wed, 6 Mar 2019 01:19:08 +0100 Subject: [PATCH] build termux-services from external repository --- packages/termux-services/build.sh | 14 +++---- packages/termux-services/start-services.sh | 2 - packages/termux-services/termux-services | 47 ---------------------- 3 files changed, 6 insertions(+), 57 deletions(-) delete mode 100644 packages/termux-services/start-services.sh delete mode 100755 packages/termux-services/termux-services diff --git a/packages/termux-services/build.sh b/packages/termux-services/build.sh index c92e79286..e485ef9b8 100644 --- a/packages/termux-services/build.sh +++ b/packages/termux-services/build.sh @@ -1,10 +1,8 @@ -TERMUX_PKG_HOMEPAGE=https://termux.com/ +TERMUX_PKG_HOMEPAGE=https://github.com/Neo-Oli/termux-services/ TERMUX_PKG_DESCRIPTION="Service daemon for Termux" -TERMUX_PKG_VERSION=0.01 +TERMUX_PKG_VERSION=0.0.3 +TERMUX_PKG_SHA256=5cb368761401b26e15529f113c8ce0b8e735fa0e911269fb7476cb8d42223c95 +TERMUX_PKG_SRCURL=https://github.com/Neo-Oli/termux-services/archive/$TERMUX_PKG_VERSION.tar.gz +TERMUX_PKG_DEPENDS="coreutils" TERMUX_PKG_PLATFORM_INDEPENDENT=yes - -termux_step_make_install () { - cp -p $TERMUX_PKG_BUILDER_DIR/termux-services $TERMUX_PREFIX/bin/ - mkdir -p $TERMUX_PREFIX/etc/profile.d/ - cp -p $TERMUX_PKG_BUILDER_DIR/start-services.sh $TERMUX_PREFIX/etc/profile.d/ -} +TERMUX_PKG_BUILD_IN_SRC=yes diff --git a/packages/termux-services/start-services.sh b/packages/termux-services/start-services.sh deleted file mode 100644 index 65411c942..000000000 --- a/packages/termux-services/start-services.sh +++ /dev/null @@ -1,2 +0,0 @@ -export SVDIR=$PREFIX/var/service -(termux-services start >/dev/null 2>&1 & ) diff --git a/packages/termux-services/termux-services b/packages/termux-services/termux-services deleted file mode 100755 index cf079fa58..000000000 --- a/packages/termux-services/termux-services +++ /dev/null @@ -1,47 +0,0 @@ -#!/data/data/com.termux/files/usr/bin/sh -# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh -set -e -start(){ - start-stop-daemon -q -S -b -m -p "$PIDFILE" -x "$DAEMON" -- $DAEMON_OPTS -} -stop(){ - start-stop-daemon -K -s 1 -o -p "$PIDFILE" -q - tail -f --pid=`cat "$PIDFILE"` /dev/null - for f in "$SVDIR"/*/supervise "$SVDIR"/*/log/supervise;do - if [ -e "$f" ];then - kill -9 `cat "$f"/pid` 2>/dev/null ||: - rm -rf "$f" - fi - done -} -# Must be a valid filename -NAME=termux-serivces -PIDFILE="$PREFIX/var/run/$NAME.pid" -#This is the command to be run, give the full pathname -DAEMON="$PREFIX/bin/applets/runsvdir" -DAEMON_OPTS="$SVDIR" - -case "$1" in - start) - echo -n "Starting daemon: $NAME" - start - echo "." - ;; - stop) - echo -n "Stopping daemon: $NAME" - stop - echo "." - ;; - restart) - echo -n "Restarting daemon: $NAME" - stop - start - echo "." - ;; - - *) - echo "Usage: "$1" {start|stop|restart}" - exit 1 -esac - -exit 0