diff options
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 20 | ||||
-rw-r--r-- | hopglass-server-wrapper | 6 | ||||
-rw-r--r-- | hopglass-server.service | 1 | ||||
-rw-r--r-- | hopglass-server@.service | 2 |
5 files changed, 24 insertions, 17 deletions
@@ -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 @@ -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 7f73b436efc6..44c9a123aceb 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 97764427583f..92c7952d7b37 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 a5e6a0485946..8529aa3e9489 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] |