forked from I2P_Developers/i2p.i2p

The amount of RAM that I2P is limited to can be adjusted using debconf. The value in /etc/i2p/wrapper.config is stored in the debconf db and is written to /etc/default/i2p.
31 lines
683 B
Bash
Executable File
31 lines
683 B
Bash
Executable File
#!/bin/sh -e
|
|
# I2P package configuration script
|
|
|
|
conffile="/etc/default/i2p"
|
|
|
|
. /usr/share/debconf/confmodule
|
|
|
|
# Load config file if it exists
|
|
if [ -e $conffile ]; then
|
|
. $conffile
|
|
|
|
# wrapper.config always takes priority
|
|
MEMORYLIMIT=$(sed -e '/^wrapper\.java\.maxmemory/!d' -e 's/^wrapper\.java\.maxmemory\ *=\ *//' /etc/i2p/wrapper.config)
|
|
|
|
|
|
db_set i2p/daemon "$RUN_DAEMON"
|
|
db_set i2p/user "$I2PUSER"
|
|
db_set i2p/memory "$MEMORYLIMIT"
|
|
fi
|
|
|
|
db_input medium i2p/daemon || true
|
|
db_go
|
|
db_get i2p/daemon || true
|
|
if [ "$RET" = "true" ]; then
|
|
db_input medium i2p/user || true
|
|
db_go
|
|
fi
|
|
|
|
db_input medium i2p/memory || true
|
|
db_go
|