diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 37 | ||||
-rw-r--r-- | nbxplorer.service | 14 |
3 files changed, 31 insertions, 24 deletions
@@ -1,7 +1,7 @@ pkgbase = nbxplorer pkgdesc = A minimalist UTXO tracker for HD Cryptocurrency Wallets. pkgver = stable - pkgrel = 3 + pkgrel = 4 url = https://github.com/dgarage/nbxplorer arch = any license = MIT @@ -15,9 +15,7 @@ pkgbase = nbxplorer depends = dotnet-host-bin depends = bitcoin-daemon source = https://github.com/dgarage/nbxplorer/archive/stable.tar.gz - source = nbxplorer.service sha256sums = SKIP - sha256sums = 198e6e0ba127402b549c88b2748f80026a511b9b956291803a64355571d859dd pkgname = nbxplorer @@ -4,21 +4,18 @@ pkgcaps=NBXplorer pkgdesc="A minimalist UTXO tracker for HD Cryptocurrency Wallets." pkgver='stable' pkgpath="github.com/dgarage/${pkgname}" -pkgrel=3 +pkgrel=4 arch=('any') url="https://${pkgpath}" license=(MIT) makedepends=('dotnet-host-bin' 'dotnet-runtime' 'dotnet-runtime-bin' 'dotnet-sdk' 'dotnet-sdk-bin' 'aspnet-runtime-2.1' 'aspnet-runtime-bin') depends=(${makedepends} 'bitcoin-daemon') -source=("${url}/archive/${pkgver}.tar.gz" -"nbxplorer.service") -sha256sums=('SKIP' - '198e6e0ba127402b549c88b2748f80026a511b9b956291803a64355571d859dd') +source=("${url}/archive/${pkgver}.tar.gz") +sha256sums=('SKIP') build() { mv ${srcdir}/${pkgcaps}-${pkgver} ${srcdir}/${pkgname} cd ${srcdir}/${pkgname} -cp -b ../nbxplorer.service nbxplorer.service ./build.sh #set absolute path in run.sh echo -e '#!/bin/bash @@ -26,6 +23,28 @@ echo -e '#!/bin/bash dotnet run --no-launch-profile --no-build -c Release -p "/usr/lib/nbxplorer/NBXplorer/NBXplorer.csproj" -- $@ ' > run.sh chmod +x run.sh + +echo -e '#!/bin/bash +#launch nbxplorer +nohup dotnet run --no-launch-profile --no-build -c Release -p "/usr/lib/nbxplorer/NBXplorer/NBXplorer.csproj" -- $@ > /dev/null 2>&1 &sleep 3 +' > run1.sh +chmod +x run1.sh + +echo -e '[Unit] +Description=NBXplorer +After=network.target +After=bitcoind.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/nbxplorer-nohup +RemainAfterExit=yes +Restart=on-failure +#User= + +[Install] +WantedBy=multi-user.target +' > nbxplorer.service } package() { @@ -39,7 +58,11 @@ cp -r ${srcdir}/${pkgname}/ ${pkgdir}/usr/lib/ #symlinking run.sh to /usr/bin/nbxplorer ln -rTsf $pkgdir/usr/lib/${pkgname}/run.sh ${pkgdir}/usr/bin/${pkgname} chmod 755 ${pkgdir}/usr/bin/${pkgname} +#symlinking run1.sh to /usr/bin/nbxplorer-nohup +ln -rTsf $pkgdir/usr/lib/${pkgname}/run1.sh ${pkgdir}/usr/bin/${pkgname}-nohup +chmod 755 ${pkgdir}/usr/bin/${pkgname}-nohup +#install systemd service +install -Dm644 ${pkgdir}/usr/lib/${pkgname}/nbxplorer.service ${pkgdir}/usr/lib/systemd/system/ #install the lisence install -Dm644 ${pkgdir}/usr/lib/${pkgname}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE -install -Dm644 ${pkgdir}/usr/lib/${pkgname}/nbxplorer.service ${pkgdir}/usr/lib/systemd/system/ } diff --git a/nbxplorer.service b/nbxplorer.service deleted file mode 100644 index d399f56c98a6..000000000000 --- a/nbxplorer.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=NBXplorer -After=network.target -After=bitcoind.service - -[Service] -Type=oneshot -ExecStart=/usr/bin/nbxplorer -RemainAfterExit=yes -Restart=on-failure -#User= - -[Install] -WantedBy=multi-user.target |