diff options
author | crabvk | 2021-04-22 07:48:25 +0500 |
---|---|---|
committer | crabvk | 2021-04-22 07:48:25 +0500 |
commit | 14ff1b1e806fdf26aec24e1826354a8f01c4484d (patch) | |
tree | 46d7c87edf9c544f17cbb4cfbac4bfcc6339cd02 | |
parent | 595d55be28a9dd749df6c2148aa3c02a67c51500 (diff) | |
download | aur-14ff1b1e806fdf26aec24e1826354a8f01c4484d.tar.gz |
Add service file and post install message
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 20 | ||||
-rw-r--r-- | nym-mixnode.sysusers | 1 | ||||
-rw-r--r-- | nym-mixnode.tmpfiles | 1 | ||||
-rw-r--r-- | nym-mixnode@.service | 17 | ||||
-rw-r--r-- | nym.install | 15 |
6 files changed, 58 insertions, 3 deletions
@@ -3,6 +3,7 @@ pkgbase = nym pkgver = 0.10.0 pkgrel = 1 url = https://nymtech.net/ + install = nym.install arch = x86_64 license = Apache license = MIT @@ -10,7 +11,13 @@ pkgbase = nym makedepends = cargo depends = openssl source = https://github.com/nymtech/nym/archive/refs/tags/v0.10.0.tar.gz + source = nym-mixnode@.service + source = nym-mixnode.sysusers + source = nym-mixnode.tmpfiles sha512sums = fd8ffc5cda70a0768ff2f73bf4bbc2827282b0d111f5365bf699e5d5e5252adbe76dad6f31d866e6d9b3377d4ab7c1c2bc363671fec693629b56da0c1cdc76b8 + sha512sums = 8bd62aa0ea25583e7b99ad57e306748772dac9dd04000f049a8471250bbb1f299ce63d6ab2b1dc8627d43d80ae27b4600726779c139c45b89c6364004d0771c5 + sha512sums = 2887eeec8b805585822aa61a12f4995d3569a82a0c198409350c3b0f15abef522e48dde66b00233119d957b18e7ae95d7c9207a49eda1c763e497f2183e4ad02 + sha512sums = 459e9fa6bc24675e4d7d2df448ea60ecb9ed0170f244a9659fb2811589bb6784b307475a4ee4d92c143ac3163446e603d60157b0f1f060d7aa0de96c51abc5d2 pkgname = nym @@ -9,8 +9,19 @@ url='https://nymtech.net/' license=('Apache' 'MIT' 'CC0') depends=(openssl) makedepends=(cargo) -source=("https://github.com/nymtech/nym/archive/refs/tags/v$pkgver.tar.gz") -sha512sums=('fd8ffc5cda70a0768ff2f73bf4bbc2827282b0d111f5365bf699e5d5e5252adbe76dad6f31d866e6d9b3377d4ab7c1c2bc363671fec693629b56da0c1cdc76b8') +source=( + "https://github.com/nymtech/nym/archive/refs/tags/v$pkgver.tar.gz" + 'nym-mixnode@.service' + 'nym-mixnode.sysusers' + 'nym-mixnode.tmpfiles' +) +sha512sums=( + 'fd8ffc5cda70a0768ff2f73bf4bbc2827282b0d111f5365bf699e5d5e5252adbe76dad6f31d866e6d9b3377d4ab7c1c2bc363671fec693629b56da0c1cdc76b8' + '8bd62aa0ea25583e7b99ad57e306748772dac9dd04000f049a8471250bbb1f299ce63d6ab2b1dc8627d43d80ae27b4600726779c139c45b89c6364004d0771c5' + '2887eeec8b805585822aa61a12f4995d3569a82a0c198409350c3b0f15abef522e48dde66b00233119d957b18e7ae95d7c9207a49eda1c763e497f2183e4ad02' + '459e9fa6bc24675e4d7d2df448ea60ecb9ed0170f244a9659fb2811589bb6784b307475a4ee4d92c143ac3163446e603d60157b0f1f060d7aa0de96c51abc5d2' +) +install='nym.install' build() { cd nym-$pkgver @@ -18,8 +29,11 @@ build() { } package() { - cd nym-$pkgver + install -Dm644 nym-mixnode@.service -t "$pkgdir/usr/lib/systemd/system" + install -Dm644 nym-mixnode.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/nym-mixnode.conf" + install -Dm644 nym-mixnode.sysusers "$pkgdir/usr/lib/sysusers.d/nym-mixnode.conf" + cd nym-$pkgver install -Dm755 \ target/release/nym-{client,gateway,mixnode,network-monitor,network-requester,socks5-client} -t "$pkgdir/usr/bin" install -Dm644 LICENSES/*.txt -t "$pkgdir/usr/share/licenses/nym" diff --git a/nym-mixnode.sysusers b/nym-mixnode.sysusers new file mode 100644 index 000000000000..e11cfd780ca7 --- /dev/null +++ b/nym-mixnode.sysusers @@ -0,0 +1 @@ +u nym - "Nym Mixnode user" /var/lib/nym /bin/bash diff --git a/nym-mixnode.tmpfiles b/nym-mixnode.tmpfiles new file mode 100644 index 000000000000..4d6c2fbba63d --- /dev/null +++ b/nym-mixnode.tmpfiles @@ -0,0 +1 @@ +d /var/lib/nym 0750 nym nym diff --git a/nym-mixnode@.service b/nym-mixnode@.service new file mode 100644 index 000000000000..04e58e02b6a0 --- /dev/null +++ b/nym-mixnode@.service @@ -0,0 +1,17 @@ +[Unit] +Description=Nym Mixnode for %I +After=network-online.target nss-lookup.target +Wants=network-online.target nss-lookup.target +Documentation=https://nymtech.net/docs/run-nym-nodes/mixnodes/ + +[Service] +User=nym +ExecStart=/usr/bin/nym-mixnode run --id %i +KillSignal=SIGINT +Restart=on-failure +RestartSec=30 +StartLimitInterval=350 +StartLimitBurst=10 + +[Install] +WantedBy=multi-user.target diff --git a/nym.install b/nym.install new file mode 100644 index 000000000000..428d3316d066 --- /dev/null +++ b/nym.install @@ -0,0 +1,15 @@ +post_install() { + echo ' +To initialize a mixnode run: + + sudo -u nym nym-mixnode init --id <node_id> --host <host_ip> + +To run a mixnode: + + systemctl start nym-mixnode@<node_id> + +To see the log: + + journalctl -n 100 -fu nym-mixnode@<node_id> +' +} |