lnd: use TERMUX_PKG_SERVICE_SCRIPT for service script

This commit is contained in:
Henrik Grimler 2021-05-15 20:53:59 +02:00
parent 3878b565da
commit c14cfae294
No known key found for this signature in database
GPG Key ID: B0076E490B71616B

View File

@ -3,12 +3,13 @@ TERMUX_PKG_DESCRIPTION="Lightning Network Daemon"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.13.3-beta
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=(https://github.com/lightningnetwork/lnd/archive/v${TERMUX_PKG_VERSION}.tar.gz
https://github.com/lightningnetwork/lnd/releases/download/v${TERMUX_PKG_VERSION}/vendor.tar.gz)
TERMUX_PKG_SHA256=(c642c14bbf34e61d1ac566d22a9775e97e3671fff90552a0060d791e533a5af2
304a59ce38ffc03c1fd4bdf9294560793865f6b19646aea03b1d5da482ff83d3)
TERMUX_PKG_DEPENDS="bitcoin"
TERMUX_PKG_CONFFILES="var/service/lnd/run var/service/lnd/log/run"
TERMUX_PKG_SERVICE_SCRIPT=("lnd" 'exec lnd 2>&1')
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_make() {
@ -20,15 +21,3 @@ termux_step_make() {
termux_step_make_install() {
install -Dm700 lnd lncli "$TERMUX_PREFIX"/bin/
}
termux_step_post_make_install() {
mkdir -p $TERMUX_PREFIX/var/service
cd $TERMUX_PREFIX/var/service
mkdir -p lnd/log
echo "#!$TERMUX_PREFIX/bin/sh" > lnd/run
echo 'exec lnd 2>&1' >> lnd/run
chmod +x lnd/run
touch lnd/down
ln -sf $TERMUX_PREFIX/share/termux-services/svlogger lnd/log/run
}