Skip to content

Commit

Permalink
bitcoin: write service script in TERMUX_PKG_SERVICE_SCRIPT instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Grimler91 committed Nov 17, 2021
1 parent 31e3c0e commit 05b7521
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions packages/bitcoin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ TERMUX_PKG_DESCRIPTION="Bitcoin Core"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=22.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/bitcoin/bitcoin/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=d0e9d089b57048b1555efa7cd5a63a7ed042482045f6f33402b1df425bf9613b
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_CONFFILES="var/service/bitcoind/run var/service/bitcoind/log/run"
TERMUX_PKG_SERVICE_SCRIPT=("bitcoind" 'exec bitcoind 2>&1')
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_BLACKLISTED_ARCHES="arm"

Expand All @@ -25,14 +25,3 @@ termux_step_pre_configure() {
(cd depends && make HOST=$TERMUX_HOST_PLATFORM NO_QT=1 -j $TERMUX_MAKE_PROCESSES)
./autogen.sh
}

termux_step_post_make_install() {
mkdir -p $TERMUX_PREFIX/var/service
cd $TERMUX_PREFIX/var/service
mkdir -p bitcoind/log
echo "#!$TERMUX_PREFIX/bin/sh" > bitcoind/run
echo 'exec bitcoind 2>&1' >> bitcoind/run
chmod +x bitcoind/run
touch bitcoind/down
ln -sf $TERMUX_PREFIX/share/termux-services/svlogger bitcoind/log/run
}

0 comments on commit 05b7521

Please sign in to comment.