source: debian/i2p.config @ 03ff4dc0

Last change on this file since 03ff4dc0 was 03ff4dc0, checked in by kytv <kytv@…>, 9 years ago

Add wrapper.java.maxmemory to debconf

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.

  • Property mode set to 100755
File size: 683 bytes
Line 
1#!/bin/sh -e
2# I2P package configuration script
3
4conffile="/etc/default/i2p"
5
6. /usr/share/debconf/confmodule
7
8# Load config file if it exists
9if [ -e $conffile ]; then
10        . $conffile
11
12        # wrapper.config always takes priority
13        MEMORYLIMIT=$(sed -e '/^wrapper\.java\.maxmemory/!d' -e 's/^wrapper\.java\.maxmemory\ *=\ *//' /etc/i2p/wrapper.config)
14
15
16        db_set i2p/daemon "$RUN_DAEMON"
17        db_set i2p/user "$I2PUSER"
18        db_set i2p/memory "$MEMORYLIMIT"
19fi
20
21db_input medium i2p/daemon || true
22db_go
23db_get i2p/daemon || true
24if [ "$RET" = "true" ]; then
25        db_input medium i2p/user || true
26        db_go
27fi
28
29db_input medium i2p/memory || true
30db_go
Note: See TracBrowser for help on using the repository browser.