diff options
author | root | 2019-08-21 22:42:43 +0200 |
---|---|---|
committer | root | 2019-08-21 22:42:43 +0200 |
commit | 4c8179283cdcb9c5a5f8b170d52b4d8ac550954f (patch) | |
tree | 0b2ab743b069d601b8f70bb37da50f34275843cc | |
parent | 7b9c5827b1fa70b32d69275713cdedb37d3bddc2 (diff) | |
download | aur-4c8179283cdcb9c5a5f8b170d52b4d8ac550954f.tar.gz |
Add systemd
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | go-swarm.install | 8 | ||||
-rw-r--r-- | swarm-resources.tar.gz | bin | 1215 -> 1393 bytes |
3 files changed, 10 insertions, 2 deletions
@@ -24,7 +24,7 @@ source=("https://github.com/ethersphere/swarm/archive/v${pkgver}.tar.gz" noextract=() md5sums=("7f394b218657463761a555d5c598a320" "SKIP" - "8e69aa2b907450a996fd33535051c1b9") + "ed8552f2daae230a7b67c76adbea2f51") validpgpkeys=("0826EDA1702D1E87C6E2875121D2E7BB88C2A746") _pythonwalletdepends=1 @@ -67,6 +67,8 @@ check() { package() { install -v -D -m0755 build/swarm ${pkgdir}/usr/local/bin/swarm + install -v -D -m0644 swarm.service ${pkgdir}/usr/lib/systemd/system/swarm.service + mkdir -p ${pkgdir}/etc/systemd/system/swarm.service.d if [ ${_pythonwalletdepends} -eq 1 ]; then install -v -D -m0700 swarm-genkey.py ${pkgdir}/usr/local/bin/swarm-genkey fi diff --git a/go-swarm.install b/go-swarm.install index 121b9e497f0c..52d78bf90e2b 100644 --- a/go-swarm.install +++ b/go-swarm.install @@ -28,7 +28,13 @@ post_install () { echo "Missing optional dependencies required to automatically generate a ethereum wallet for the swarm node" echo "You will not be able to run a node with it" echo "You can generate it manually later using go-ethereum or the swarm-genkey.py script provided this package, provided dependencies are met" - fi + fi + + echo "setting up variables for systemd service" + account=$(ls /var/lib/bzz/.ethereum/keystore | sed -e 's/^.*--\([a-fA-F0-9]*\)$/\1/') + echo "SWARM_ACCOUNT=$account" > /etc/systemd/system/swarm.service.d/42-swarm.conf + echo "SWARM_PASSWORD=/var/lib/bzz/.swarm-pass" >> /etc/systemd/system/swarm.service.d/42-swarm.conf + chown -v bzz:bzz /var/lib/bzz -R chmod 700 /var/lib/bzz/.ethereum/keystore } diff --git a/swarm-resources.tar.gz b/swarm-resources.tar.gz Binary files differindex ccdcb7a692f1..a4bae0e0982f 100644 --- a/swarm-resources.tar.gz +++ b/swarm-resources.tar.gz |