summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Singer2017-05-19 16:34:18 +0200
committerFelix Singer2017-05-19 16:34:18 +0200
commit45bff6c02688b61b1431da65a39a7a23557688b1 (patch)
treeb4d998a2821176da75f3dc331f25cae593f6b6af
parente99f6c008a83a214a26a2e3f2fa8d4f7fc7eaf8b (diff)
downloadaur-45bff6c02688b61b1431da65a39a7a23557688b1.tar.gz
Add systemd service, use variables
-rw-r--r--PKGBUILD14
-rw-r--r--murmur.service18
2 files changed, 26 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4d82566c50d..df1115a112d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -28,18 +28,20 @@ build() {
}
package() {
- cd "${srcdir}/mumble-${pkgver//_/\~}~snapshot"
+ murmur="${srcdir}/mumble-${pkgver//_/\~}~snapshot"
- cat release/murmurd release/libmumble_proto.a > "release/murmurd_new"
+ cat ${murmur}/release/murmurd ${murmur}/release/libmumble_proto.a > "${murmur}/release/murmurd_new"
install -m750 -d "${pkgdir}/etc/murmur"
- install -m640 -D "./scripts/murmur.ini" "${pkgdir}/etc/murmur/murmur.ini"
+ install -m640 -D "${murmur}/scripts/murmur.ini" "${pkgdir}/etc/murmur/murmur.ini"
- install -m755 -D "./release/murmurd_new" "${pkgdir}/usr/bin/murmurd"
+ install -m755 -D "${murmur}/release/murmurd_new" "${pkgdir}/usr/bin/murmurd"
+
+ install -m644 -D "murmur.service" "${pkgdir}/usr/lib/systemd/system/murmur.service"
install -m755 -d "${pkgdir}/usr/share/man/man1"
- install -m644 -D "./man/murmurd.1" "${pkgdir}/usr/share/man/man1/"
- install -m644 -D "./LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -m644 -D "${murmur}/man/murmurd.1" "${pkgdir}/usr/share/man/man1/"
+ install -m644 -D "${murmur}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
sed -e "s|database=|database=/var/lib/murmur/murmur.sqlite|" \
-e "s|;logfile=murmur.log|logfile=/var/log/murmur/murmur.log|" \
diff --git a/murmur.service b/murmur.service
new file mode 100644
index 00000000000..f4c9fd05920
--- /dev/null
+++ b/murmur.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Mumble Daemon
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/murmur/murmur.pid
+ExecStart=/usr/bin/murmurd -ini /etc/murmur/murmur.ini
+User=murmur
+Group=murmur
+Restart=always
+PrivateDevices=true
+PrivateTmp=true
+ProtectSystem=full
+ProtectHome=true
+
+[Install]
+WantedBy=multi-user.target