source: debian/i2p.service @ f2239ba

Last change on this file since f2239ba was 627f707, checked in by kytv <kytv@…>, 5 years ago

debian: Add support for setting open file limits to initscript, add comment to explain how to do it with systemd

  • Property mode set to 100644
File size: 1.9 KB
Line 
1# It's not recommended to modify this file because it will be
2# overwritten during package upgrades.  If you want to make changes, the
3# best way is to create a file "/etc/systemd/system/i2p.service.d/foo.conf"
4# and make your changes there. This file will be parsed after the file
5# i2p.service itself is parsed.
6#
7# For more info about custom unit files, see systemd.unit(5) or
8# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
9
10# For example, if you want to increase I2P's open-files-limit to 10000,
11# you need to increase systemd's LimitNOFILE setting, so create a file named
12# "/etc/systemd/system/i2p.service.d/limits.conf" containing:
13#       [Service]
14#       LimitNOFILE=10000
15
16# Don't forget to reload systemd daemon after you change unit configuration:
17# root> systemctl --system daemon-reload
18
19[Unit]
20Description=load-balanced unspoofable packet switching network
21After=local-fs.target network.target time-sync.target
22
23[Service]
24Type=forking
25EnvironmentFile=/etc/default/i2p
26RuntimeDirectory=i2p
27RuntimeDirectoryMode=750
28PIDFile=/run/i2p/i2p.pid
29Environment="I2P_ARGS=/etc/i2p/wrapper.config \
30 wrapper.java.additional.1=-DloggerFilenameOverride=/var/log/i2p/log-router-@.txt \
31 wrapper.java.additional.10=-Dwrapper.logfile=/var/log/i2p/wrapper.log \
32 wrapper.java.additional.11=-Di2p.dir.pid=/run/i2p \
33 wrapper.java.additional.12=-Di2p.dir.temp=/tmp/i2p-daemon \
34 wrapper.logfile=/var/log/i2p/wrapper.log \
35 wrapper.pidfile=/run/i2p/i2p.pid\
36 wrapper.java.pidfile=/run/i2p/routerjvm.pid \
37 wrapper.daemonize=TRUE" TZ=UTC
38User=i2psvc
39PermissionsStartOnly=true
40AppArmorProfile=system_i2p
41ExecStartPre=/bin/mkdir -p /tmp/i2p-daemon
42ExecStartPre=/bin/chown -R ${I2PUSER}:${I2PUSER} /var/log/i2p /run/i2p /tmp/i2p-daemon
43ExecStartPre=/bin/chmod 750 /var/log/i2p
44ExecStart=/usr/sbin/wrapper "$I2P_ARGS"
45ExecStopPost=/bin/rm -rf /run/i2p
46
47[Install]
48WantedBy=multi-user.target
Note: See TracBrowser for help on using the repository browser.