summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiquel Lionel2021-06-08 13:28:04 +0100
committerMiquel Lionel2021-06-08 13:52:15 +0100
commit3cf854bed370b7aff65eb394f09c0dad3ec85c9b (patch)
tree72c51524465a2f6ae37db54c661f1e9f469969b8
parent4e3c0a42f20e67b9c6e4ed26e30c60bf8910d8be (diff)
downloadaur-3cf854bed370b7aff65eb394f09c0dad3ec85c9b.tar.gz
systemd service is more robust. fix $_PKG_HONKDIR
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD17
-rw-r--r--honk.service11
3 files changed, 22 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index eaa032dd5ad..85b3585905d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = honk-hg
pkgdesc = ActivityPub compatible server with web frontend. Mercurialtip.
- pkgver = 1340.0a351daab5d0
+ pkgver = 1341.f74b9ce19463
pkgrel = 2
epoch = 0
url = https://humungus.tedunangst.com/r/honk
@@ -18,8 +18,8 @@ pkgbase = honk-hg
conflicts = honk
options = strip
options = zipman
+ options = docs
source = hg+https://humungus.tedunangst.com/r/honk
sha512sums = SKIP
pkgname = honk-hg
-
diff --git a/PKGBUILD b/PKGBUILD
index c403d1be9b1..6b7151e8e46 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=honk-hg
_pkgname=honk
-pkgver=1340.0a351daab5d0
+pkgver=1341.f74b9ce19463
pkgrel=2
epoch=0
pkgdesc="ActivityPub compatible server with web frontend. Mercurialtip."
@@ -18,7 +18,7 @@ provides=("${pkgname}")
conflicts=("${pkgname}" 'honk')
source=("hg+https://humungus.tedunangst.com/r/honk")
sha512sums=('SKIP')
-options=(strip zipman)
+options=(strip zipman docs)
install="$_pkgname.install"
pkgver() {
@@ -33,17 +33,18 @@ build() {
}
package() {
- _PKG_HONKDIR="$pkgdir/usr/share/$pkgname"
+ _PKG_HONKDIR="$pkgdir/usr/share/$_pkgname"
_PKG_DOCDIR="$srcdir/$_pkgname/docs"
_MANDIR="$pkgdir/usr/share/man/man"
install -Dm755 "$srcdir/$_pkgname/$_pkgname" -t "$pkgdir/usr/bin"
install -Dm644 "$srcdir/$_pkgname"/views/* -t "$_PKG_HONKDIR/views/"
install -Dm644 "$_PKG_DOCDIR"/* -t "$_PKG_HONKDIR/docs/"
-
- for i in {1,3,5,8}; do
- install -Dm644 $_PKG_DOCDIR/honk.$i.gz -t ${_MANDIR}$i/
- done
+
+# gzip -k -f $_PKG_DOCDIR/*.{1,3,5,7,8}
+ for i in {1,3,5,8}; do
+ install -Dm644 $_PKG_DOCDIR/honk.$i.gz -t ${_MANDIR}$i/
+ done
install -Dm644 $_PKG_DOCDIR/activitypub.7.gz ${_MANDIR}7/honk_activitypub.7.gz
install -Dm644 $_PKG_DOCDIR/hfcs.1.gz ${_MANDIR}1/honk_hfcs.1.gz
@@ -52,5 +53,5 @@ package() {
install -Dm644 "$srcdir/$_pkgname"/LICENSE -t "$pkgdir/usr/share/licenses/$_pkgname"
- install -Dm644 "../$_pkgname.service" -t "$pkgdir/etc/systemd/system"
+ install -Dm644 "../$_pkgname.service" -t "$pkgdir/usr/lib/systemd/system/"
}
diff --git a/honk.service b/honk.service
index 661030b91e4..f42c7aa7d9a 100644
--- a/honk.service
+++ b/honk.service
@@ -1,9 +1,20 @@
[Unit]
Description="Honk ActivityPub server"
+After=syslog.target network.target
+Requires=network.target
[Service]
+Restart=always
+RestartSec=30
WorkingDirectory=/usr/share/honk
ExecStart=/usr/bin/honk
+NoNewPrivileges=yes
+ProtectHostname=true
+ProtectKernelLogs=true
+ProtectKernelModules=true
+ProtectKernelTunables=true
+ProtectControlGroups=true
+
User=honk
Group=honk