|
|
@ -10,24 +10,26 @@ PROG=/usr/sbin/i2pd |
|
|
|
USER="i2pd" |
|
|
|
GROUP="i2pd" |
|
|
|
PIDFILE=/var/run/i2pd.pid |
|
|
|
DATADIR=/etc/i2pd |
|
|
|
PEERDIR=/var/lib/i2pd/peerProfiles |
|
|
|
DATADIR=/var/lib/i2pd |
|
|
|
|
|
|
|
|
|
|
|
start_service() { |
|
|
|
## RAM |
|
|
|
if [ ! -d $PEERDIR ]; then |
|
|
|
mkdir -p $PEERDIR |
|
|
|
chown $USER:$GROUP $PEERDIR |
|
|
|
if [ ! -d $DATADIR ]; then |
|
|
|
mkdir -p $DATADIR |
|
|
|
ln -s /usr/share/i2pd/certificates $DATADIR/certificates |
|
|
|
ln -s /etc/i2pd/tunnels.conf $DATADIR/tunnels.conf |
|
|
|
# for peoples who not possible to use http reseeding |
|
|
|
ln -s /etc/i2pd/addressbook $DATADIR/addressbook |
|
|
|
fi |
|
|
|
|
|
|
|
## We need permissions |
|
|
|
chown -R $USER:$GROUP $DATADIR |
|
|
|
chown $USER:$GROUP $DATADIR |
|
|
|
touch $PIDFILE |
|
|
|
chown $USER:adm $PIDFILE |
|
|
|
|
|
|
|
procd_open_instance |
|
|
|
procd_set_param command $PROG --service --conf=/etc/i2pd/i2pd.conf |
|
|
|
procd_set_param command $PROG --service --conf=/etc/i2pd/i2pd.conf --pidfile $PIDFILE |
|
|
|
## Don't know about i2pd user's HOME |
|
|
|
procd_set_param env HOME=$DATADIR |
|
|
|
procd_set_param limits nofile=4096 |
|
|
|