2018-02-03 02:29:28 +08:00
|
|
|
[Unit]
|
|
|
|
Description=I2P Router written in C++
|
|
|
|
Documentation=man:i2pd(1) https://i2pd.readthedocs.io/en/latest/
|
|
|
|
After=network.target
|
2020-09-18 10:22:32 +03:00
|
|
|
ConditionFileIsExecutable=/usr/sbin/i2pd
|
2018-02-03 02:29:28 +08:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
User=i2pd
|
|
|
|
Group=i2pd
|
2020-09-18 10:22:32 +03:00
|
|
|
PermissionsStartOnly=yes
|
|
|
|
|
2018-02-03 02:29:28 +08:00
|
|
|
RuntimeDirectory=i2pd
|
|
|
|
RuntimeDirectoryMode=0700
|
2018-03-05 18:30:02 +01:00
|
|
|
LogsDirectory=i2pd
|
|
|
|
LogsDirectoryMode=0700
|
2020-09-18 10:22:32 +03:00
|
|
|
Type=exec
|
2020-09-18 17:20:03 +03:00
|
|
|
Environment="DAEMON_OPTS=--conf=/etc/i2pd/i2pd.conf --tunconf=/etc/i2pd/tunnels.conf --tunnelsdir=/etc/i2pd/tunnels.conf.d --pidfile=/run/i2pd/i2pd.pid --logfile=/var/log/i2pd/i2pd.log --loglevel=error --service"
|
2020-09-18 10:22:32 +03:00
|
|
|
EnvironmentFile=-/etc/default/i2pd
|
|
|
|
ExecStart=/usr/sbin/i2pd $DAEMON_OPTS
|
2019-07-24 11:15:31 +01:00
|
|
|
ExecReload=/bin/sh -c "kill -HUP $MAINPID"
|
|
|
|
PIDFile=/run/i2pd/i2pd.pid
|
2020-09-18 17:25:21 +03:00
|
|
|
Restart=on-failure
|
2018-02-03 02:29:28 +08:00
|
|
|
|
|
|
|
KillSignal=SIGQUIT
|
|
|
|
# If you have the patience waiting 10 min on restarting/stopping it, uncomment this.
|
|
|
|
# i2pd stops accepting new tunnels and waits ~10 min while old ones do not die.
|
|
|
|
#KillSignal=SIGINT
|
|
|
|
#TimeoutStopSec=10m
|
|
|
|
|
2020-09-18 10:22:32 +03:00
|
|
|
LimitNOFILE=65536
|
2018-11-06 20:04:26 +03:00
|
|
|
# To enable write of coredump uncomment this
|
|
|
|
#LimitCORE=infinity
|
2018-02-03 02:29:28 +08:00
|
|
|
|
2020-09-18 10:22:32 +03:00
|
|
|
# Hardening
|
|
|
|
NoNewPrivileges=yes
|
|
|
|
PrivateTmp=yes
|
|
|
|
PrivateUsers=true
|
2020-09-18 18:20:05 +03:00
|
|
|
DevicePolicy=closed
|
2020-09-18 10:22:32 +03:00
|
|
|
PrivateDevices=yes
|
|
|
|
ProtectHome=yes
|
|
|
|
ProtectSystem=full
|
|
|
|
ProtectClock=true
|
|
|
|
ProtectControlGroups=yes
|
|
|
|
ProtectHostname=true
|
|
|
|
ProtectKernelLogs=true
|
|
|
|
ProtectKernelModules=yes
|
|
|
|
ProtectKernelTunables=yes
|
|
|
|
ProtectSystem=strict
|
|
|
|
RestrictAddressFamilies=AF_INET AF_INET6
|
2020-09-18 18:20:05 +03:00
|
|
|
RestrictNamespaces=true
|
2020-09-18 10:22:32 +03:00
|
|
|
RestrictRealtime=true
|
|
|
|
RestrictSUIDSGID=true
|
|
|
|
RemoveIPC=true
|
|
|
|
ReadOnlyDirectories=/
|
|
|
|
ReadWriteDirectories=-/var/lib/i2pd
|
|
|
|
ReadWriteDirectories=-/var/log/i2pd
|
|
|
|
ReadWriteDirectories=-/run
|
|
|
|
CapabilityBoundingSet=
|
2020-09-18 18:20:05 +03:00
|
|
|
UMask=0077
|
|
|
|
LockPersonality=true
|
|
|
|
MemoryDenyWriteExecute=true
|
|
|
|
SystemCallArchitectures=native
|
|
|
|
SystemCallFilter=~@clock @debug @module @mount @raw-io @reboot @mount @raw-io @reboot @swap @privileged @resources @cpu-emulation @obsolete
|
2020-09-18 10:22:32 +03:00
|
|
|
|
2018-02-03 02:29:28 +08:00
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|