mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-11-19 21:25:30 +00:00
Merge pull request #1089 from yangfl/upstream
i2pd.service: do not block system shutdown for 10 min
This commit is contained in:
commit
b8a2c9f955
@ -1,27 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=I2P Router written in C++
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
User=i2pd
|
|
||||||
Group=i2pd
|
|
||||||
RuntimeDirectory=i2pd
|
|
||||||
RuntimeDirectoryMode=0700
|
|
||||||
Type=simple
|
|
||||||
ExecStart=/usr/sbin/i2pd --conf=/etc/i2pd/i2pd.conf --tunconf=/etc/i2pd/tunnels.conf --pidfile=/var/run/i2pd/i2pd.pid --logfile=/var/log/i2pd/i2pd.log --daemon --service
|
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
|
||||||
PIDFile=/var/run/i2pd/i2pd.pid
|
|
||||||
### Uncomment, if auto restart needed
|
|
||||||
#Restart=on-failure
|
|
||||||
|
|
||||||
### Use SIGINT for graceful stop daemon.
|
|
||||||
# i2pd stops accepting new tunnels and waits ~10 min while old ones do not die.
|
|
||||||
KillSignal=SIGINT
|
|
||||||
TimeoutStopSec=10m
|
|
||||||
|
|
||||||
# If you have problems with hanging i2pd, you can try enable this
|
|
||||||
#LimitNOFILE=4096
|
|
||||||
PrivateDevices=yes
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
1
contrib/debian/i2pd.service
Symbolic link
1
contrib/debian/i2pd.service
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../i2pd.service
|
29
contrib/i2pd.service
Normal file
29
contrib/i2pd.service
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=I2P Router written in C++
|
||||||
|
Documentation=man:i2pd(1) https://i2pd.readthedocs.io/en/latest/
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=i2pd
|
||||||
|
Group=i2pd
|
||||||
|
RuntimeDirectory=i2pd
|
||||||
|
RuntimeDirectoryMode=0700
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/sbin/i2pd --conf=/etc/i2pd/i2pd.conf --tunconf=/etc/i2pd/tunnels.conf --pidfile=/var/run/i2pd/i2pd.pid --logfile=/var/log/i2pd/i2pd.log --daemon --service
|
||||||
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
PIDFile=/var/run/i2pd/i2pd.pid
|
||||||
|
### Uncomment, if auto restart needed
|
||||||
|
#Restart=on-failure
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
# If you have problems with hanging i2pd, you can try enable this
|
||||||
|
#LimitNOFILE=4096
|
||||||
|
PrivateDevices=yes
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -1,28 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=I2P Router written in C++
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
User=i2pd
|
|
||||||
Group=i2pd
|
|
||||||
PermissionsStartOnly=True
|
|
||||||
RuntimeDirectory=i2pd
|
|
||||||
RuntimeDirectoryMode=0700
|
|
||||||
Type=simple
|
|
||||||
ExecStart=/usr/sbin/i2pd --conf=/etc/i2pd/i2pd.conf --tunconf=/etc/i2pd/tunnels.conf --pidfile=/var/run/i2pd/i2pd.pid --logfile=/var/log/i2pd/i2pd.log --daemon --service
|
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
|
||||||
PIDFile=/var/run/i2pd/i2pd.pid
|
|
||||||
### Uncomment, if auto restart needed
|
|
||||||
#Restart=on-failure
|
|
||||||
|
|
||||||
### Use SIGINT for graceful stop daemon.
|
|
||||||
# i2pd stops accepting new tunnels and waits ~10 min while old ones do not die.
|
|
||||||
KillSignal=SIGINT
|
|
||||||
TimeoutStopSec=10m
|
|
||||||
|
|
||||||
# If you have problems with hunging i2pd, you can try enable this
|
|
||||||
#LimitNOFILE=4096
|
|
||||||
PrivateDevices=yes
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
1
contrib/rpm/i2pd.service
Symbolic link
1
contrib/rpm/i2pd.service
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../i2pd.service
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
#include <sys/endian.h>
|
#include <sys/endian.h>
|
||||||
#elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
|
#elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__GLIBC__)
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
#elif defined(__APPLE__) && defined(__MACH__)
|
#elif defined(__APPLE__) && defined(__MACH__)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user