summarylogtreecommitdiffstats
path: root/i2prouter.service
diff options
context:
space:
mode:
authorskydrome2019-11-06 01:30:42 -0500
committerskydrome2019-11-06 01:30:42 -0500
commit81b34eadb0c2624d3b69a229a2d63551104e9745 (patch)
treeccf8200fa8e87c9fe5a3ced64e12a34c396d00d4 /i2prouter.service
parent9431f135caf9977fa336cb8692af342a75a81f45 (diff)
downloadaur-81b34eadb0c2624d3b69a229a2d63551104e9745.tar.gz
rehaul i2p user creation/permissions and service file
Diffstat (limited to 'i2prouter.service')
-rwxr-xr-xi2prouter.service26
1 files changed, 20 insertions, 6 deletions
diff --git a/i2prouter.service b/i2prouter.service
index 7c278c833596..5a80c870e9fc 100755
--- a/i2prouter.service
+++ b/i2prouter.service
@@ -1,18 +1,32 @@
+# It's not recommended to modify this file because it will be
+# overwritten during package upgrades. If you want to make changes, the
+# best way is to create a file "/etc/systemd/system/i2prouter.service.d/foo.conf"
+# and make your changes there. This file will be parsed after the file
+# i2p.service itself is parsed.
+
[Unit]
Description=Invisible Internet Project
-After=network.target
+After=network.target time-sync.target
[Service]
Type=forking
User=i2p
PIDFile=/run/i2p/i2p.pid
-Environment=WRAPPER_CONF=/opt/i2p/wrapper.config
-ExecStart=/usr/bin/java-service-wrapper ${WRAPPER_CONF} \
- wrapper.name=i2prouter wrapper.syslog.ident=i2prouter \
- wrapper.daemonize=TRUE
-SendSIGKILL=no
+
+NoNewPrivileges=yes
+PrivateTmp=yes
+PrivateDevices=yes
+DeviceAllow=/dev/null rw
+DeviceAllow=/dev/urandom r
+LimitNOFILE=4096
+
+ExecStart=/usr/bin/java-service-wrapper /opt/i2p/wrapper.config \
+ wrapper.name=i2prouter \
+ wrapper.syslog.ident=i2prouter \
+ wrapper.daemonize=TRUE TZ=UTC
ExecReload=/bin/kill -USR1 $MAINPID
ExecStop=/bin/kill -TERM $MAINPID
+SendSIGKILL=no
SuccessExitStatus=0 2 3
[Install]