diff options
author | Leo P | 2017-12-20 14:44:51 -0500 |
---|---|---|
committer | Leo P | 2017-12-20 14:44:51 -0500 |
commit | e4f019255ae7bc6fb8f86baf173666126497f117 (patch) | |
tree | b9341a5772b04cd152810d455968eaafd082f73a | |
parent | ccd736a3cd4e625964fd2eed5e11e8b54fdc6b9f (diff) | |
download | aur-e4f019255ae7bc6fb8f86baf173666126497f117.tar.gz |
added raiblocks-node service
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | PKGBUILD | 26 | ||||
-rw-r--r-- | install | 16 | ||||
-rw-r--r-- | raiblocks.service | 15 |
4 files changed, 61 insertions, 21 deletions
@@ -1,10 +1,11 @@ # Generated by mksrcinfo v8 -# Tue Dec 19 12:29:26 UTC 2017 +# Wed Dec 20 19:44:33 UTC 2017 pkgbase = raiblocks-git pkgdesc = RaiBlocks is a cryptocurrency designed from the ground up for scalable instant transactions and zero transaction fees. - pkgver = 9.0.r11.gc55c1bc9 - pkgrel = 2 + pkgver = 9.0.r13.g957386c1 + pkgrel = 1 url = http://raiblocks.com/ + install = install arch = i686 arch = x86_64 license = BSD 2-clause @@ -14,20 +15,22 @@ pkgbase = raiblocks-git provides = raiblocks source = raiblocks.desktop source = raiblocks128.png + source = raiblocks.service source = git+https://github.com/clemahieu/raiblocks.git source = git+https://github.com/boostorg/beast.git source = git+https://github.com/weidai11/cryptopp.git source = git+https://github.com/LMDB/lmdb.git source = git+https://github.com/miniupnp/miniupnp.git source = git+https://github.com/clemahieu/phc-winner-argon2.git - md5sums = 2a43d03fef957acdff063c3890c71552 - md5sums = cc6dea992d6be78427c2bab5640eaef0 - md5sums = SKIP - md5sums = SKIP - md5sums = SKIP - md5sums = SKIP - md5sums = SKIP - md5sums = SKIP + sha256sums = 74b9bc75c3d5596603e54e2553ff69d367f384789c7565437a72a64dc22f0fdd + sha256sums = 7e08e2b6d50638fb1438c746da78defc49ef317ee8ffa6feeb52635a976a0ea9 + sha256sums = 53ed2e7cf24c02172e3e804dd8689674867d82ca21b7d03be590d7a9b3a9c8bb + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP pkgname = raiblocks-git @@ -1,12 +1,13 @@ pkgname=raiblocks-git -pkgver=9.0.r11.gc55c1bc9 -pkgrel=2 +pkgver=9.0.r13.g957386c1 +pkgrel=1 pkgdesc="RaiBlocks is a cryptocurrency designed from the ground up for scalable instant transactions and zero transaction fees." arch=('i686' 'x86_64') url="http://raiblocks.com/" license=('BSD 2-clause') depends=('qt5-base' 'boost' 'boost-libs') provides=(raiblocks) +install=install pkgver() { cd "raiblocks" git describe --long --tags | sed 's/^[vV]//;s/\([^-]*-g\)/r\1/;s/-/./g' @@ -14,20 +15,23 @@ pkgver() { source=(raiblocks.desktop raiblocks128.png + raiblocks.service git+https://github.com/clemahieu/raiblocks.git git+https://github.com/boostorg/beast.git git+https://github.com/weidai11/cryptopp.git git+https://github.com/LMDB/lmdb.git git+https://github.com/miniupnp/miniupnp.git git+https://github.com/clemahieu/phc-winner-argon2.git) -md5sums=('2a43d03fef957acdff063c3890c71552' - 'cc6dea992d6be78427c2bab5640eaef0' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP') + +sha256sums=('74b9bc75c3d5596603e54e2553ff69d367f384789c7565437a72a64dc22f0fdd' + '7e08e2b6d50638fb1438c746da78defc49ef317ee8ffa6feeb52635a976a0ea9' + '53ed2e7cf24c02172e3e804dd8689674867d82ca21b7d03be590d7a9b3a9c8bb' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP') prepare() { cd "$srcdir/raiblocks" @@ -66,6 +70,8 @@ package() { install -Dm644 "$srcdir"/raiblocks128.png "$pkgdir"/usr/share/pixmaps/raiblocks128.png install -Dm644 "$srcdir"/raiblocks.desktop "$pkgdir"/usr/share/applications/raiblocks.desktop + + install -Dm644 "$srcdir"/raiblocks.service "$pkgdir"/usr/lib/systemd/system/raiblocks-node.service } # vim:set ts=2 sw=2 et: diff --git a/install b/install new file mode 100644 index 000000000000..4382aba03c36 --- /dev/null +++ b/install @@ -0,0 +1,16 @@ +create_user() { + getent passwd raiblocks &>/dev/null || { + echo -n ">>> Creating raiblocks service user... " + useradd --system --user-group -m --home /var/lib/raiblocks raiblocks + echo "done" + } # NOTE: we do not autoremove user due to security concerns (Arch policy) + #chown raiblocks:raiblocks /var/lib/raiblocks +} + +post_install() { + create_user +} + +post_upgrade() { + create_user +}
\ No newline at end of file diff --git a/raiblocks.service b/raiblocks.service new file mode 100644 index 000000000000..d579e348375a --- /dev/null +++ b/raiblocks.service @@ -0,0 +1,15 @@ +[Unit] +Description=Raiblocks Node +After=network.target + +[Service] +User=raiblocks +Group=raiblocks +WorkingDirectory=~ +RuntimeDirectory=raiblocks + +Type=simple +ExecStart=/usr/bin/rai_node --data_path /var/lib/raiblocks --daemon + +[Install] +WantedBy=multi-user.target |