mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 15:08:40 +01:00
+14
-11
@@ -1,15 +1,18 @@
|
||||
config i2pd
|
||||
# Set where i2pd should store its data (netDB, certificates, addresses, etc)
|
||||
# By default we store it in RAM so no data is written to ROM.
|
||||
# IMPORTANT!
|
||||
# Data is consistently rewritten. DO NOT POINT IT TO INNER ROM. Flash will
|
||||
# die.
|
||||
# Set where i2pd should store its data (netDB, certificates, addresses,
|
||||
# etc). By default we store it in RAM so no data is written to ROM.
|
||||
# If you store data permanently, you may want to enable
|
||||
# 'profiles = true' and 'addressbook = true' in i2pd.conf
|
||||
#### IMPORTANT! ####
|
||||
# Data is consistently rewritten. DO NOT POINT IT TO INNER ROM. Flash
|
||||
# will die.
|
||||
option data_dir '/var/lib/i2pd'
|
||||
|
||||
# If you don't store i2pd data permanently, you can still choose to store only
|
||||
# addressbook. If not, i2pd will be forced to do HTTP reseeding reseeding on
|
||||
# every start. Storing addressbook may be useful if HTTP reseeding is not
|
||||
# possible or blocked (by censorship).
|
||||
# Even addressbook doesn't take up too much space, extroot is still strongly
|
||||
# recommended to avoid flash wear-out.
|
||||
# If you don't store i2pd data permanently, you can still choose to
|
||||
# store only addressbooks. If not, i2pd will be forced to do HTTP
|
||||
# reseeding on every start. Storing addressbook may be useful
|
||||
# if HTTP reseeding is not possible or blocked (by censorship).
|
||||
# Even addressbook doesn't take up too much space, extroot is still
|
||||
# strongly recommended to avoid flash wear-out.
|
||||
# Enable 'addressbook = true' in i2pd.conf to make it take effect.
|
||||
#option addressbook_dir '/etc/i2pd/addressbook'
|
||||
|
||||
@@ -11,7 +11,7 @@ PROG=/usr/sbin/i2pd
|
||||
USER="i2pd"
|
||||
GROUP="i2pd"
|
||||
PIDFILE=/var/run/i2pd.pid
|
||||
#DATADIR=/var/lib/i2pd
|
||||
DATADIR=/var/lib/i2pd
|
||||
CONFFILE=/etc/i2pd/i2pd.conf
|
||||
|
||||
. /lib/functions.sh
|
||||
@@ -23,14 +23,13 @@ i2pd_start() {
|
||||
local data_dir
|
||||
local addressbook_dir
|
||||
|
||||
config_get data_dir "$cfg" data_dir
|
||||
config_get data_dir "$cfg" data_dir "$DATADIR"
|
||||
config_get addressbook_dir "$cfg" addressbook_dir
|
||||
|
||||
## Setting up data dir
|
||||
if [ ! -d "$data_dir" ]; then
|
||||
mkdir -p "$data_dir"
|
||||
ln -s /usr/share/i2pd/certificates "$data_dir/certificates"
|
||||
ln -s /etc/i2pd/tunnels.conf "$data_dir/tunnels.conf"
|
||||
if [ -n "$addressbook_dir" ]; then
|
||||
if [ ! -d "$addressbook_dir" ]; then
|
||||
mkdir -p "$addressbook_dir"
|
||||
@@ -49,6 +48,9 @@ i2pd_start() {
|
||||
procd_set_param command "$PROG" --service --conf="$CONFFILE" --pidfile "$PIDFILE"
|
||||
## Don't know about i2pd user's HOME
|
||||
procd_set_param env "HOME=$DATADIR"
|
||||
## For debugging, provide about 512 MB on external storage for coredump and adjust /proc/sys/kernel/core_pattern
|
||||
# echo "/tmp/coredumps/core.%e.%p.%s.%t" > /proc/sys/kernel/core_pattern
|
||||
# procd_set_param limits core="unlimited unlimited"
|
||||
procd_set_param limits nofile=4096
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
|
||||
Reference in New Issue
Block a user