diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-08-28 12:27:14 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-08-28 12:27:14 +0200 |
commit | 194059e45f95532c226bfbd29b2e43c2659a1552 (patch) | |
tree | ba29d38dd59d79740bb59b8f20490b7a6fc87ad8 | |
parent | 59a36b88e6d6f0b1cd706ef21771656f9357e9a4 (diff) | |
download | gnunet-194059e45f95532c226bfbd29b2e43c2659a1552.tar.gz gnunet-194059e45f95532c226bfbd29b2e43c2659a1552.zip |
-add files from madmurphy so that other distros may benefit
-rw-r--r-- | contrib/services/systemd/Makefile.am | 5 | ||||
-rw-r--r-- | contrib/services/systemd/gnunet-user.service | 11 | ||||
-rw-r--r-- | contrib/services/systemd/gnunet.service | 16 | ||||
-rw-r--r-- | contrib/services/systemd/sysusers-gnunet.conf | 4 | ||||
-rw-r--r-- | contrib/services/systemd/tmpfiles-gnunet.conf | 10 | ||||
-rw-r--r-- | debian/gnunet.service | 12 |
6 files changed, 42 insertions, 16 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 @@ | |||
1 | pkginitdir= $(pkgdatadir)/services/systemd | 1 | pkginitdir= $(pkgdatadir)/services/systemd |
2 | 2 | ||
3 | pkginit_DATA = \ | 3 | pkginit_DATA = \ |
4 | gnunet.service | 4 | gnunet.service \ |
5 | gnunet-user.service \ | ||
6 | sysusers-gnunet.conf \ | ||
7 | tmpfiles-gnunet.conf | ||
5 | 8 | ||
6 | EXTRA_DIST = \ | 9 | EXTRA_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] | ||
3 | Description=GNUnet user service | ||
4 | After=network.target | ||
5 | |||
6 | [Service] | ||
7 | Type=simple | ||
8 | ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm -c ~/.config/gnunet.conf | ||
9 | |||
10 | [Install] | ||
11 | 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 @@ | |||
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] |
9 | Description=Service that runs a GNUnet for the user gnunet | 3 | Description=GNUnet system service |
10 | After=network.target | 4 | After=network.target |
11 | 5 | ||
12 | [Service] | 6 | [Service] |
13 | User=gnunet | ||
14 | Type=simple | 7 | Type=simple |
8 | User=gnunet | ||
15 | ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm -c /etc/gnunet.conf | 9 | ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm -c /etc/gnunet.conf |
10 | StateDirectory=gnunet | ||
11 | |||
12 | [Install] | ||
13 | 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 @@ | |||
1 | # Typically placed into /usr/lib/sysusers.d/gnunet.conf | ||
2 | g gnunet - | ||
3 | u gnunet - "GNUnet system account" /var/lib/gnunet | ||
4 | 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 @@ | |||
1 | # Typically placed into /usr/lib/tmpfiles.d/gnunet.conf | ||
2 | d /var/lib/gnunet 0700 gnunet gnunet - - | ||
3 | z /usr/lib/gnunet/gnunet-helper-dns 4750 root gnunetdns - - | ||
4 | z /usr/lib/gnunet/gnunet-service-dns 2750 gnunet gnunetdns - - | ||
5 | z /usr/lib/gnunet/libexec/gnunet-helper-vpn 4750 root root - - | ||
6 | z /usr/lib/gnunet/libexec/gnunet-helper-transport-wlan 4750 root root - - | ||
7 | z /usr/lib/gnunet/libexec/gnunet-helper-transport-bluetooth 4750 root root - - | ||
8 | z /usr/lib/gnunet/libexec/gnunet-helper-exit 4750 root root - - | ||
9 | z /usr/lib/gnunet/libexec/gnunet-helper-nat-server 4750 root root - - | ||
10 | z /usr/lib/gnunet/libexec/gnunet-helper-nat-client 4750 root root - - | ||
diff --git a/debian/gnunet.service b/debian/gnunet.service index 4b650e5ff..b538802c4 100644 --- a/debian/gnunet.service +++ b/debian/gnunet.service | |||
@@ -1,12 +1,12 @@ | |||
1 | [Unit] | 1 | [Unit] |
2 | Description=A framework for secure peer-to-peer networking | 2 | Description=GNUnet system service |
3 | After=network.target | ||
3 | 4 | ||
4 | [Service] | 5 | [Service] |
5 | EnvironmentFile=/etc/default/gnunet | 6 | Type=simple |
6 | User=${GNUNET_USER} | 7 | User=gnunet |
7 | Type=forking | 8 | ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm -c /etc/gnunet.conf |
8 | ExecStart=/usr/bin/gnunet-arm -s -c /etc/gnunet.conf | 9 | StateDirectory=gnunet |
9 | ExecStop=/usr/bin/gnunet-arm -e -c /etc/gnunet.conf | ||
10 | 10 | ||
11 | [Install] | 11 | [Install] |
12 | WantedBy=multi-user.target | 12 | WantedBy=multi-user.target |