summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-28 12:27:14 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-28 12:27:14 +0200
commit194059e45f95532c226bfbd29b2e43c2659a1552 (patch)
treeba29d38dd59d79740bb59b8f20490b7a6fc87ad8 /contrib
parent59a36b88e6d6f0b1cd706ef21771656f9357e9a4 (diff)
-add files from madmurphy so that other distros may benefit
Diffstat (limited to 'contrib')
-rw-r--r--contrib/services/systemd/Makefile.am5
-rw-r--r--contrib/services/systemd/gnunet-user.service11
-rw-r--r--contrib/services/systemd/gnunet.service16
-rw-r--r--contrib/services/systemd/sysusers-gnunet.conf4
-rw-r--r--contrib/services/systemd/tmpfiles-gnunet.conf10
5 files changed, 36 insertions, 10 deletions
diff --git a/contrib/services/systemd/Makefile.am b/contrib/services/systemd/Makefile.am
index 39a6f2a81..ec2ff7704 100644
--- a/contrib/services/systemd/Makefile.am
+++ b/contrib/services/systemd/Makefile.am
@@ -1,7 +1,10 @@
pkginitdir= $(pkgdatadir)/services/systemd
pkginit_DATA = \
- gnunet.service
+ gnunet.service \
+ gnunet-user.service \
+ sysusers-gnunet.conf \
+ tmpfiles-gnunet.conf
EXTRA_DIST = \
$(pkginit_DATA)
diff --git a/contrib/services/systemd/gnunet-user.service b/contrib/services/systemd/gnunet-user.service
new file mode 100644
index 000000000..c9d3be0ad
--- /dev/null
+++ b/contrib/services/systemd/gnunet-user.service
@@ -0,0 +1,11 @@
+# Typically to be place into /usr/lib/systemd/user/gnunet.service
+[Unit]
+Description=GNUnet user service
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm -c ~/.config/gnunet.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/contrib/services/systemd/gnunet.service b/contrib/services/systemd/gnunet.service
index 1c458cea6..25b3c2f0e 100644
--- a/contrib/services/systemd/gnunet.service
+++ b/contrib/services/systemd/gnunet.service
@@ -1,15 +1,13 @@
-# Copyright (C) 2019 GNUnet e.V.
-#
-# Copying and distribution of this file, with or without modification,
-# are permitted in any medium without royalty provided the copyright
-# notice and this notice are preserved. This file is offered as-is,
-# without any warranty.
-
+# Typically placed into /usr/lib/systemd/system/gnunet.service
[Unit]
-Description=Service that runs a GNUnet for the user gnunet
+Description=GNUnet system service
After=network.target
[Service]
-User=gnunet
Type=simple
+User=gnunet
ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm -c /etc/gnunet.conf
+StateDirectory=gnunet
+
+[Install]
+WantedBy=multi-user.target
diff --git a/contrib/services/systemd/sysusers-gnunet.conf b/contrib/services/systemd/sysusers-gnunet.conf
new file mode 100644
index 000000000..b7b8abeed
--- /dev/null
+++ b/contrib/services/systemd/sysusers-gnunet.conf
@@ -0,0 +1,4 @@
+# Typically placed into /usr/lib/sysusers.d/gnunet.conf
+g gnunet -
+u gnunet - "GNUnet system account" /var/lib/gnunet
+g gnunetdns -
diff --git a/contrib/services/systemd/tmpfiles-gnunet.conf b/contrib/services/systemd/tmpfiles-gnunet.conf
new file mode 100644
index 000000000..ffffa3284
--- /dev/null
+++ b/contrib/services/systemd/tmpfiles-gnunet.conf
@@ -0,0 +1,10 @@
+# Typically placed into /usr/lib/tmpfiles.d/gnunet.conf
+d /var/lib/gnunet 0700 gnunet gnunet - -
+z /usr/lib/gnunet/gnunet-helper-dns 4750 root gnunetdns - -
+z /usr/lib/gnunet/gnunet-service-dns 2750 gnunet gnunetdns - -
+z /usr/lib/gnunet/libexec/gnunet-helper-vpn 4750 root root - -
+z /usr/lib/gnunet/libexec/gnunet-helper-transport-wlan 4750 root root - -
+z /usr/lib/gnunet/libexec/gnunet-helper-transport-bluetooth 4750 root root - -
+z /usr/lib/gnunet/libexec/gnunet-helper-exit 4750 root root - -
+z /usr/lib/gnunet/libexec/gnunet-helper-nat-server 4750 root root - -
+z /usr/lib/gnunet/libexec/gnunet-helper-nat-client 4750 root root - -