summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsetBoolean2021-04-01 04:32:56 +0200
committersetBoolean2021-04-01 04:32:56 +0200
commit6ea8558916d02dc424ddb4bf68029b374b1d27dc (patch)
tree25525bdcd8c09e41445f38b44893dcf5ccf2320c
parentacf398b9334f75ca20dae541ab483e0d11b01cc9 (diff)
downloadaur-6ea8558916d02dc424ddb4bf68029b374b1d27dc.tar.gz
move config to system default location
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD20
-rwxr-xr-xgoshimmer.install1
-rw-r--r--goshimmer.service2
4 files changed, 19 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 174e50a0af7f..fe387037fce2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,16 @@
pkgbase = goshimmer-bin
pkgdesc = GoShimmer implementation of Coordicide (official precompiled binary)
pkgver = 0.5.4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/iotaledger/goshimmer
install = goshimmer.install
arch = x86_64
license = Apache
- backup = var/lib/goshimmer/config.json
+ backup = etc/goshimmer/config.json
source = https://github.com/iotaledger/goshimmer/releases/download/v0.5.4/goshimmer-0.5.4_Linux_x86_64.tar.gz
source = goshimmer.service
sha256sums = 4106bb37f268f49009c6231a0423d60d8c130bb2ea9e95ca532279fdecb9a32b
- sha256sums = fa8f7409fe68d58e29640e915eae3aeb3b6585fdbee4bc550d3e0c105f18dc34
+ sha256sums = 37e021ce73e05f1878896de42c76877a68fe6a678294bda0de3934b1f5a0d9c8
pkgname = goshimmer-bin
diff --git a/PKGBUILD b/PKGBUILD
index 347786a1c9c3..4f6722b8d6fe 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname="goshimmer-bin"
_pkgname="goshimmer"
pkgver="0.5.4"
-pkgrel="1"
+pkgrel="2"
pkgdesc="GoShimmer implementation of Coordicide (official precompiled binary)"
arch=('x86_64')
url="https://github.com/iotaledger/goshimmer"
@@ -10,24 +10,32 @@ license=("Apache")
source=("https://github.com/iotaledger/goshimmer/releases/download/v${pkgver}/${_pkgname}-${pkgver}_Linux_x86_64.tar.gz"
"goshimmer.service")
sha256sums=('4106bb37f268f49009c6231a0423d60d8c130bb2ea9e95ca532279fdecb9a32b'
- 'fa8f7409fe68d58e29640e915eae3aeb3b6585fdbee4bc550d3e0c105f18dc34')
-backup=('var/lib/goshimmer/config.json')
+ '37e021ce73e05f1878896de42c76877a68fe6a678294bda0de3934b1f5a0d9c8')
+backup=('etc/goshimmer/config.json')
install=goshimmer.install
package() {
cd "${srcdir}"
- # Package files
+ # Move executable to /usr/bin
+
mkdir -p "${pkgdir}/usr/bin/"
cp goshimmer "${pkgdir}/usr/bin/"
+ # Move files to /var/lib/goshimmer
+
mkdir -p "${pkgdir}/var/lib/goshimmer/"
cp snapshot.bin "${pkgdir}/var/lib/goshimmer/"
- cp config.json "${pkgdir}/var/lib/goshimmer/"
cp README.md "${pkgdir}/var/lib/goshimmer/"
cp LICENSE "${pkgdir}/var/lib/goshimmer/"
- # Systemd service
+ # Move config to standard location
+
+ mkdir -p "${pkgdir}/etc/goshimmer/"
+ cp config.json "${pkgdir}/etc/goshimmer/"
+
+ # Install systemd service
+
mkdir -p "${pkgdir}/usr/lib/systemd/system/"
cp goshimmer.service "${pkgdir}/usr/lib/systemd/system/"
}
diff --git a/goshimmer.install b/goshimmer.install
index 48f232dcf3dc..95c49c9b9ef3 100755
--- a/goshimmer.install
+++ b/goshimmer.install
@@ -5,6 +5,7 @@ pre_install() {
useradd --no-create-home --system goshimmer > /dev/null
fi
mkdir -p /var/lib/goshimmer
+ mkdir -p /etc/goshimmer
}
post_install() {
diff --git a/goshimmer.service b/goshimmer.service
index 49b1f0af099a..076e1d46c955 100644
--- a/goshimmer.service
+++ b/goshimmer.service
@@ -15,7 +15,7 @@ User=goshimmer
WorkingDirectory=/var/lib/goshimmer
TimeoutSec=1200
Restart=always
-ExecStart=/usr/bin/goshimmer -c "/var/lib/goshimmer/config.json"
+ExecStart=/usr/bin/goshimmer -c "/etc/goshimmer/config.json"
[Install]
WantedBy=multi-user.target