commit
808efd69ee
2 changed files with 31 additions and 7 deletions
|
@ -9,13 +9,13 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=i2pd
|
||||
PKG_VERSION:=2.24.0
|
||||
PKG_VERSION:=2.26.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:=809b37100f0f176432b01ab6edee96dc62b0f65d5bf7531e008a87117e742566
|
||||
PKG_HASH:=2ae18978c8796bb6b45bc8cfe4e1f25377e0cfc9fcf9f46054b09dc3384eef63
|
||||
|
||||
PKG_MAINTAINER:=David Yang <mmyangfl@gmail.com>
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
|
|
|
@ -18,14 +18,13 @@ CONFFILE=/etc/i2pd/i2pd.conf
|
|||
|
||||
|
||||
|
||||
start_service() {
|
||||
i2pd_start() {
|
||||
local cfg="$1"
|
||||
local data_dir
|
||||
local addressbook_dir
|
||||
|
||||
config_load i2pd
|
||||
|
||||
config_get data_dir i2pd data_dir
|
||||
config_get addressbook_dir i2pd addressbook_dir
|
||||
config_get data_dir "$cfg" data_dir
|
||||
config_get addressbook_dir "$cfg" addressbook_dir
|
||||
|
||||
## Setting up data dir
|
||||
if [ ! -d "$data_dir" ]; then
|
||||
|
@ -57,3 +56,28 @@ start_service() {
|
|||
procd_set_param pidfile "$PIDFILE"
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
|
||||
start_service() {
|
||||
local instance="$1"
|
||||
local instance_found=0
|
||||
|
||||
config_cb() {
|
||||
local type="$1"
|
||||
local name="$2"
|
||||
if [ "$type" = "i2pd" ]; then
|
||||
if [ -n "$instance" ] && [ "$instance" = "$name" ]; then
|
||||
instance_found=1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
config_load i2pd
|
||||
|
||||
if [ -n "$instance" ]; then
|
||||
[ "$instance_found" -gt 0 ] || return
|
||||
i2pd_start "$instance"
|
||||
else
|
||||
config_foreach i2pd_start i2pd
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue