i2pd: Update to 2.26.0 9130/head
authorDavid Yang <mmyangfl@gmail.com>
Mon, 3 Jun 2019 14:44:29 +0000 (22:44 +0800)
committerDavid Yang <mmyangfl@gmail.com>
Wed, 31 Jul 2019 02:14:30 +0000 (10:14 +0800)
Signed-off-by: David Yang <mmyangfl@gmail.com>
net/i2pd/Makefile
net/i2pd/files/i2pd.init

index 20708c02744134862f866f9f2085ba9c9b68f66a..4775365d18bc4011ed71813af7dc88f7d97405ac 100644 (file)
@@ -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
index 4af1013637478dd1617e9ac0a1d02b54c48a4bb0..a40a74205087f930f29e8d14c195212a8d7584fd 100755 (executable)
@@ -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
+}