Changeset 627f707 for debian/i2p.service


Ignore:
Timestamp:
Jun 14, 2015 8:16:16 PM (5 years ago)
Author:
kytv <kytv@…>
Branches:
master
Children:
8096e4f6
Parents:
863e120
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • debian/i2p.service

    r863e120 r627f707  
     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
    119[Unit]
    220Description=load-balanced unspoofable packet switching network
    3 After=network.target
     21After=local-fs.target network.target time-sync.target
    422
    523[Service]
    624Type=forking
    725EnvironmentFile=/etc/default/i2p
     26RuntimeDirectory=i2p
     27RuntimeDirectoryMode=750
     28PIDFile=/run/i2p/i2p.pid
    829Environment="I2P_ARGS=/etc/i2p/wrapper.config \
    930 wrapper.java.additional.1=-DloggerFilenameOverride=/var/log/i2p/log-router-@.txt \
     
    1738User=i2psvc
    1839PermissionsStartOnly=true
    19 ExecStartPre=/bin/mkdir -p /run/i2p /tmp/i2p-daemon
     40AppArmorProfile=system_i2p
     41ExecStartPre=/bin/mkdir -p /tmp/i2p-daemon
    2042ExecStartPre=/bin/chown -R ${I2PUSER}:${I2PUSER} /var/log/i2p /run/i2p /tmp/i2p-daemon
    2143ExecStartPre=/bin/chmod 750 /var/log/i2p
    2244ExecStart=/usr/sbin/wrapper "$I2P_ARGS"
    23 ExecStopPost=/bin/rm -rf /run/i2p /tmp/i2p-daemon
     45ExecStopPost=/bin/rm -rf /run/i2p
    2446
    2547[Install]
Note: See TracChangeset for help on using the changeset viewer.