i2pd: Move DATADIR to /var/lib/i2pd, fix #5693
Original author: dartraiden <wowemuh@gmail.com> Signed-off-by: David Yang <mmyangfl@gmail.com>
This commit is contained in:
parent
9ce4d5191f
commit
86106ecb80
2 changed files with 10 additions and 10 deletions
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=i2pd
|
PKG_NAME:=i2pd
|
||||||
PKG_VERSION:=2.18.0
|
PKG_VERSION:=2.18.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
|
@ -55,8 +55,6 @@ define Package/i2pd/install
|
||||||
$(INSTALL_DIR) $(1)/usr/share/i2pd
|
$(INSTALL_DIR) $(1)/usr/share/i2pd
|
||||||
$(CP) $(PKG_BUILD_DIR)/contrib/certificates $(1)/usr/share/i2pd
|
$(CP) $(PKG_BUILD_DIR)/contrib/certificates $(1)/usr/share/i2pd
|
||||||
$(INSTALL_DIR) $(1)/etc/i2pd
|
$(INSTALL_DIR) $(1)/etc/i2pd
|
||||||
$(LN) /usr/share/i2pd/certificates $(1)/etc/i2pd/certificates
|
|
||||||
$(LN) /var/lib/i2pd/peerProfiles $(1)/etc/i2pd/peerProfiles
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/i2pd.conf $(1)/etc/i2pd
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/i2pd.conf $(1)/etc/i2pd
|
||||||
$(SED) ' \
|
$(SED) ' \
|
||||||
s/127.0.0.1/192.168.1.1/g; \
|
s/127.0.0.1/192.168.1.1/g; \
|
||||||
|
|
|
@ -10,24 +10,26 @@ PROG=/usr/sbin/i2pd
|
||||||
USER="i2pd"
|
USER="i2pd"
|
||||||
GROUP="i2pd"
|
GROUP="i2pd"
|
||||||
PIDFILE=/var/run/i2pd.pid
|
PIDFILE=/var/run/i2pd.pid
|
||||||
DATADIR=/etc/i2pd
|
DATADIR=/var/lib/i2pd
|
||||||
PEERDIR=/var/lib/i2pd/peerProfiles
|
|
||||||
|
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
## RAM
|
## RAM
|
||||||
if [ ! -d $PEERDIR ]; then
|
if [ ! -d $DATADIR ]; then
|
||||||
mkdir -p $PEERDIR
|
mkdir -p $DATADIR
|
||||||
chown $USER:$GROUP $PEERDIR
|
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
|
fi
|
||||||
|
|
||||||
## We need permissions
|
## We need permissions
|
||||||
chown -R $USER:$GROUP $DATADIR
|
chown $USER:$GROUP $DATADIR
|
||||||
touch $PIDFILE
|
touch $PIDFILE
|
||||||
chown $USER:adm $PIDFILE
|
chown $USER:adm $PIDFILE
|
||||||
|
|
||||||
procd_open_instance
|
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
|
## Don't know about i2pd user's HOME
|
||||||
procd_set_param env HOME=$DATADIR
|
procd_set_param env HOME=$DATADIR
|
||||||
procd_set_param limits nofile=4096
|
procd_set_param limits nofile=4096
|
||||||
|
|
Loading…
Reference in a new issue