summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Pässler2019-01-20 21:06:04 +0000
committerMilan Pässler2019-01-20 21:06:04 +0000
commit0fd4614ce949048986d4924954a25d25ab608051 (patch)
treea643a813a0be308b2a66902a3b8ce6e4f5974dac
parentaa53720f5305b599e85486bde61783c9bf2e1a79 (diff)
downloadaur-0fd4614ce949048986d4924954a25d25ab608051.tar.gz
update to current master, fix multi-site service
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD20
-rw-r--r--hopglass-server-wrapper6
-rw-r--r--hopglass-server.service1
-rw-r--r--hopglass-server@.service2
5 files changed, 24 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fe23fe201de..f9a5b0192e9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = hopglass-server
pkgdesc = The HopGlass server collects data from Freifunk networks
- pkgver = v0.1.3_39_g3d5b233
- pkgrel = 1
+ pkgver = v0.1.3_43_g8bfd039
+ pkgrel = 2
url = https://github.com/hopglass/hopglass-server
arch = x86_64
license = AGPL-3.0
@@ -13,14 +13,14 @@ pkgbase = hopglass-server
source = hopglass-server-wrapper
source = hopglass-server.service
source = hopglass-server.sysusers
- source = hopglass-server@.service
source = hopglass-server.tmpfiles
+ source = hopglass-server@.service
sha256sums = SKIP
- sha256sums = 6bf23bc9f54004aaaf21a1d8ae2b7db674463e8cc0b0072133e133c2f100611b
- sha256sums = fbbe882ea0a2c67b284d537deffc41b986b058ec3ac776509cec20c0f3d79808
+ sha256sums = 9fa94399ba955eb035f31adaafe43865e135c5f6327b5250a37ab3f4f7727cd4
+ sha256sums = b066078e4ad28b29c14ec704087bae6b9e01e029a80b38d07124ec4204cb85f1
sha256sums = ea593147929f11b796c8d10d6aa649e25ac4d2bb692a0416aea884d4b7797565
- sha256sums = 273c5455635d08862f2a2059019a457dd59e046b5d6415b1425eac2f605fca0c
sha256sums = 12adb52aeece94ae09e99bf14615b605ce92a2ce26eaf20f541bc967b78712db
+ sha256sums = 6e377bf71689fa04a82f51940115a1c856951c4e3007b3ec11e8a0674b7a2fcd
pkgname = hopglass-server
diff --git a/PKGBUILD b/PKGBUILD
index 270aa7df393..1944258c600 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# Maintainer: Milan Pässler <me at pbb dot lc>
pkgname=hopglass-server
-pkgver=v0.1.3_39_g3d5b233
-pkgrel=1
+pkgver=v0.1.3_43_g8bfd039
+pkgrel=2
pkgdesc="The HopGlass server collects data from Freifunk networks"
arch=('x86_64')
url="https://github.com/hopglass/hopglass-server"
@@ -13,15 +13,15 @@ source=("git+https://github.com/hopglass/hopglass-server"
hopglass-server-wrapper
hopglass-server.service
hopglass-server.sysusers
- hopglass-server@.service
- hopglass-server.tmpfiles)
+ hopglass-server.tmpfiles
+ hopglass-server@.service)
sha256sums=('SKIP'
- '6bf23bc9f54004aaaf21a1d8ae2b7db674463e8cc0b0072133e133c2f100611b'
- 'fbbe882ea0a2c67b284d537deffc41b986b058ec3ac776509cec20c0f3d79808'
- 'ea593147929f11b796c8d10d6aa649e25ac4d2bb692a0416aea884d4b7797565'
- '273c5455635d08862f2a2059019a457dd59e046b5d6415b1425eac2f605fca0c'
- '12adb52aeece94ae09e99bf14615b605ce92a2ce26eaf20f541bc967b78712db')
+ '9fa94399ba955eb035f31adaafe43865e135c5f6327b5250a37ab3f4f7727cd4'
+ 'b066078e4ad28b29c14ec704087bae6b9e01e029a80b38d07124ec4204cb85f1'
+ 'ea593147929f11b796c8d10d6aa649e25ac4d2bb692a0416aea884d4b7797565'
+ '12adb52aeece94ae09e99bf14615b605ce92a2ce26eaf20f541bc967b78712db'
+ '6e377bf71689fa04a82f51940115a1c856951c4e3007b3ec11e8a0674b7a2fcd')
pkgver() {
cd "${srcdir}/hopglass-server"
@@ -43,7 +43,6 @@ package() {
install -Dm644 hopglass-server/README.md -t "${pkgdir}"/usr/share/hopglass-server/
cp -r hopglass-server/modules "${pkgdir}"/usr/share/hopglass-server/
- cp -r hopglass-server/scripts "${pkgdir}"/usr/share/hopglass-server/
cp -r hopglass-server/node_modules "${pkgdir}"/usr/share/hopglass-server/
install -Dm755 hopglass-server-wrapper "${pkgdir}"/usr/bin/hopglass-server
@@ -51,6 +50,7 @@ package() {
install -Dm644 hopglass-server.service -t "${pkgdir}"/usr/lib/systemd/system/
install -Dm644 hopglass-server@.service -t "${pkgdir}"/usr/lib/systemd/system/
install -Dm644 hopglass-server.sysusers "${pkgdir}"/usr/lib/sysusers.d/hopglass-server.conf
+ install -Dm644 hopglass-server.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/hopglass-server.conf
install -Dm644 hopglass-server/config.json.example "${pkgdir}"/etc/hopglass-server/config.json
install -Dm644 hopglass-server/aliases.json.example "${pkgdir}"/etc/hopglass-server/aliases.json
diff --git a/hopglass-server-wrapper b/hopglass-server-wrapper
index 7f73b436efc..44c9a123ace 100644
--- a/hopglass-server-wrapper
+++ b/hopglass-server-wrapper
@@ -1,3 +1,9 @@
#!/usr/bin/bash
+if [ "$(whoami)" = "root" ];
+then
+ echo hopglass-server does not support running as root!
+ exit 1
+fi
+
export NODE_PATH=/usr/share/hopglass-server/
/usr/bin/node /usr/share/hopglass-server/hopglass-server.js $@
diff --git a/hopglass-server.service b/hopglass-server.service
index 97764427583..92c7952d7b3 100644
--- a/hopglass-server.service
+++ b/hopglass-server.service
@@ -5,6 +5,7 @@ Description=The HopGlass Server collects data from the Freifunk network
Type=simple
User=hopglass-server
Group=nobody
+StateDirectory=hopglass-server
WorkingDirectory=/var/lib/hopglass-server/
ExecStart=/usr/bin/hopglass-server --config /etc/hopglass-server/config.json
Restart=always
diff --git a/hopglass-server@.service b/hopglass-server@.service
index a5e6a048594..8529aa3e948 100644
--- a/hopglass-server@.service
+++ b/hopglass-server@.service
@@ -5,9 +5,9 @@ Description=The HopGlass Server collects data from the Freifunk network (%I)
Type=simple
User=hopglass-server
Group=nobody
+StateDirectory=hopglass-server/%I
WorkingDirectory=/var/lib/hopglass-server/%I/
ExecStart=/usr/bin/hopglass-server --config /etc/hopglass-server/%I/config.json
-ExecStartPre=/usr/bin/mkdir -p /var/lib/hopglass-server/%I/
Restart=always
[Install]