Browse Source

i2pd: Update to 2.29.0

Ran init script through shellcheck. Simplified several statements.

Replaced INSTALL_CONF with INSTALL_DATA. i2pd runs as non-root and so the
conf file must be accessible.

Fixed: https://github.com/openwrt/packages/issues/10977

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 4 years ago
parent
commit
efeab1c569
No known key found for this signature in database GPG Key ID: 36D31CFA845F0E3B
2 changed files with 10 additions and 16 deletions
  1. +2
    -2
      net/i2pd/Makefile
  2. +8
    -14
      net/i2pd/files/i2pd.init

+ 2
- 2
net/i2pd/Makefile View File

@ -9,13 +9,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=i2pd
PKG_VERSION:=2.28.0
PKG_VERSION:=2.29.0
PKG_RELEASE:=1
PKG_BUILD_PARALLEL:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/PurpleI2P/i2pd/tar.gz/$(PKG_VERSION)?
PKG_HASH:=181327edc7cf5b3c25ee51ecc518a4da90fa9e421eca2107996791038a514a21
PKG_HASH:=fd0474c33b411593b9dc8197f3799d37d68455c11a9ee3994ec993a96388ec06
PKG_MAINTAINER:=David Yang <mmyangfl@gmail.com>
PKG_LICENSE:=BSD-3-Clause


+ 8
- 14
net/i2pd/files/i2pd.init View File

@ -27,20 +27,18 @@ i2pd_start() {
config_get addressbook_dir "$cfg" addressbook_dir
## Setting up data dir
if [ ! -d "$data_dir" ]; then
[ -d "$data_dir" ] || {
mkdir -p "$data_dir"
chown "$USER:$GROUP" "$data_dir"
ln -s /usr/share/i2pd/certificates "$data_dir/certificates"
if [ -n "$addressbook_dir" ]; then
if [ ! -d "$addressbook_dir" ]; then
mkdir -p "$addressbook_dir"
fi
[ -n "$addressbook_dir" ] && {
[ -d "$addressbook_dir" ] || mkdir -p "$addressbook_dir"
chown "$USER:$GROUP" "$addressbook_dir"
ln -s "$addressbook_dir" "$data_dir/addressbook"
fi
fi
}
}
## We need permissions
chown "$USER:$GROUP" "$data_dir"
chown "$USER:$GROUP" "$addressbook_dir"
touch "$PIDFILE"
chown "$USER:adm" "$PIDFILE"
@ -67,11 +65,7 @@ start_service() {
config_cb() {
local type="$1"
local name="$2"
if [ "$type" = "i2pd" ]; then
if [ -n "$instance" ] && [ "$instance" = "$name" ]; then
instance_found=1
fi
fi
[ "$type" = "i2pd" ] && [ -n "$instance" ] && [ "$instance" = "$name" ] && instance_found=1
}
config_load i2pd


Loading…
Cancel
Save