diff options
author | Moses Narrow | 2019-12-17 15:20:11 -0600 |
---|---|---|
committer | Moses Narrow | 2019-12-17 15:20:11 -0600 |
commit | a7ddf284b4ea2ee3ddce1c2f0588a8b59b4a3016 (patch) | |
tree | a9218acf4a92268841dd7702dd003f7522634ca0 /PKGBUILD | |
parent | fcba1398587d0243b295c0533bcfe791aa33fcd1 (diff) | |
download | aur-a7ddf284b4ea2ee3ddce1c2f0588a8b59b4a3016.tar.gz |
fix systemd service
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 37 |
1 files changed, 30 insertions, 7 deletions
@@ -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/ } |