aboutsummaryrefslogtreecommitdiff
path: root/contrib/services/systemd
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/services/systemd
parent59a36b88e6d6f0b1cd706ef21771656f9357e9a4 (diff)
downloadgnunet-194059e45f95532c226bfbd29b2e43c2659a1552.tar.gz
gnunet-194059e45f95532c226bfbd29b2e43c2659a1552.zip
-add files from madmurphy so that other distros may benefit
Diffstat (limited to 'contrib/services/systemd')
-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 @@
1pkginitdir= $(pkgdatadir)/services/systemd 1pkginitdir= $(pkgdatadir)/services/systemd
2 2
3pkginit_DATA = \ 3pkginit_DATA = \
4 gnunet.service 4 gnunet.service \
5 gnunet-user.service \
6 sysusers-gnunet.conf \
7 tmpfiles-gnunet.conf
5 8
6EXTRA_DIST = \ 9EXTRA_DIST = \
7 $(pkginit_DATA) 10 $(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 @@
1# Typically to be place into /usr/lib/systemd/user/gnunet.service
2[Unit]
3Description=GNUnet user service
4After=network.target
5
6[Service]
7Type=simple
8ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm -c ~/.config/gnunet.conf
9
10[Install]
11WantedBy=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 @@
1# Copyright (C) 2019 GNUnet e.V. 1# Typically placed into /usr/lib/systemd/system/gnunet.service
2#
3# Copying and distribution of this file, with or without modification,
4# are permitted in any medium without royalty provided the copyright
5# notice and this notice are preserved. This file is offered as-is,
6# without any warranty.
7
8[Unit] 2[Unit]
9Description=Service that runs a GNUnet for the user gnunet 3Description=GNUnet system service
10After=network.target 4After=network.target
11 5
12[Service] 6[Service]
13User=gnunet
14Type=simple 7Type=simple
8User=gnunet
15ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm -c /etc/gnunet.conf 9ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm -c /etc/gnunet.conf
10StateDirectory=gnunet
11
12[Install]
13WantedBy=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 @@
1# Typically placed into /usr/lib/sysusers.d/gnunet.conf
2g gnunet -
3u gnunet - "GNUnet system account" /var/lib/gnunet
4g 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 @@
1# Typically placed into /usr/lib/tmpfiles.d/gnunet.conf
2d /var/lib/gnunet 0700 gnunet gnunet - -
3z /usr/lib/gnunet/gnunet-helper-dns 4750 root gnunetdns - -
4z /usr/lib/gnunet/gnunet-service-dns 2750 gnunet gnunetdns - -
5z /usr/lib/gnunet/libexec/gnunet-helper-vpn 4750 root root - -
6z /usr/lib/gnunet/libexec/gnunet-helper-transport-wlan 4750 root root - -
7z /usr/lib/gnunet/libexec/gnunet-helper-transport-bluetooth 4750 root root - -
8z /usr/lib/gnunet/libexec/gnunet-helper-exit 4750 root root - -
9z /usr/lib/gnunet/libexec/gnunet-helper-nat-server 4750 root root - -
10z /usr/lib/gnunet/libexec/gnunet-helper-nat-client 4750 root root - -