aboutsummaryrefslogtreecommitdiff
path: root/security/i2pd
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2021-01-18 23:30:22 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2021-01-18 23:30:22 +0000
commit13bab9e73d1b9c4485d581943af5faec7945007e (patch)
tree9cbd4501dee503d84f204c590de8b81f914896c7 /security/i2pd
parent547e06acd8adeaf8b458b3afebc53a610df7c9a6 (diff)
downloadports-13bab9e73d1b9c4485d581943af5faec7945007e.tar.gz
ports-13bab9e73d1b9c4485d581943af5faec7945007e.zip
Notes
Diffstat (limited to 'security/i2pd')
-rw-r--r--security/i2pd/Makefile5
-rw-r--r--security/i2pd/files/i2pd.in9
-rw-r--r--security/i2pd/files/patch-contrib_i2pd.conf23
-rw-r--r--security/i2pd/files/pkg-message.in8
-rw-r--r--security/i2pd/pkg-message11
-rw-r--r--security/i2pd/pkg-plist1
6 files changed, 40 insertions, 17 deletions
diff --git a/security/i2pd/Makefile b/security/i2pd/Makefile
index c98fa5062a2d..93e29c18eb85 100644
--- a/security/i2pd/Makefile
+++ b/security/i2pd/Makefile
@@ -3,6 +3,7 @@
PORTNAME= i2pd
PORTVERSION= 2.35.0
+PORTREVISION= 1
CATEGORIES= security net-p2p
MAINTAINER= amdmi3@FreeBSD.org
@@ -28,7 +29,7 @@ GROUPS= _i2pd
PLIST_SUB= USER="${USERS}" GROUP="${GROUPS}"
SUB_LIST= USER="${USERS}" GROUP="${GROUPS}"
-SUB_FILES= i2pd.newsyslog.conf
+SUB_FILES= i2pd.newsyslog.conf pkg-message
OPTIONS_DEFINE= AESNI UPNP DOCS HARDENING
@@ -45,6 +46,8 @@ do-install:
${INSTALL_MAN} ${WRKSRC}/debian/${PORTNAME}.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d
${INSTALL_DATA} ${WRKDIR}/i2pd.newsyslog.conf ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/i2pd.conf
+ @${MKDIR} ${STAGEDIR}${ETCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/contrib/i2pd.conf ${STAGEDIR}${ETCDIR}/i2pd.conf.sample
@${MKDIR} ${STAGEDIR}/var/run/i2pd
@${MKDIR} ${STAGEDIR}/var/log/i2pd
@${MKDIR} ${STAGEDIR}/var/db/i2pd
diff --git a/security/i2pd/files/i2pd.in b/security/i2pd/files/i2pd.in
index 0ba1601e73f8..f13f391f6e81 100644
--- a/security/i2pd/files/i2pd.in
+++ b/security/i2pd/files/i2pd.in
@@ -20,15 +20,14 @@ load_rc_config ${name}
: ${i2pd_enable="NO"}
: ${i2pd_user="%%USER%%"}
: ${i2pd_group="%%GROUP%%"}
-: ${i2pd_pidfile="/var/run/${name}/${name}.pid"}
: ${i2pd_datadir="/var/db/${name}"}
-: ${i2pd_logfile="/var/log/${name}/${name}.log"}
+: ${i2pd_config="%%ETCDIR%%/i2pd.conf"}
required_dirs=${i2pd_datadir}
-pidfile=${i2pd_pidfile}
+pidfile=/var/run/i2pd/i2pd.pid
command="%%PREFIX%%/bin/${name}"
-command_args="--pidfile ${i2pd_pidfile} --service --datadir ${i2pd_datadir} --log file --logfile ${i2pd_logfile} --daemon"
+command_args="--conf ${i2pd_config} --service --datadir ${i2pd_datadir} --daemon"
extra_commands="reload"
-reload_cmd="pkill -1 -F ${i2pd_pidfile} -x i2pd"
+reload_cmd="pkill -1 -F ${pidfile} -x i2pd"
run_rc_command "$1"
diff --git a/security/i2pd/files/patch-contrib_i2pd.conf b/security/i2pd/files/patch-contrib_i2pd.conf
new file mode 100644
index 000000000000..6e17bef32855
--- /dev/null
+++ b/security/i2pd/files/patch-contrib_i2pd.conf
@@ -0,0 +1,23 @@
+--- contrib/i2pd.conf.orig 2020-08-24 16:48:09 UTC
++++ contrib/i2pd.conf
+@@ -16,7 +16,7 @@
+ # tunnelsdir = /var/lib/i2pd/tunnels.d
+
+ ## Where to write pidfile (default: i2pd.pid, not used in Windows)
+-# pidfile = /run/i2pd.pid
++pidfile = /var/run/i2pd/i2pd.pid
+
+ ## Logging configuration section
+ ## By default logs go to stdout with level 'info' and higher
+@@ -25,9 +25,9 @@
+ ## * stdout - print log entries to stdout
+ ## * file - log entries to a file
+ ## * syslog - use syslog, see man 3 syslog
+-# log = file
++log = file
+ ## Path to logfile (default - autodetect)
+-# logfile = /var/log/i2pd/i2pd.log
++logfile = /var/log/i2pd/i2pd.log
+ ## Log messages above this level (debug, info, *warn, error, none)
+ ## If you set it to none, logging will be disabled
+ # loglevel = warn
diff --git a/security/i2pd/files/pkg-message.in b/security/i2pd/files/pkg-message.in
new file mode 100644
index 000000000000..de7f8b9deb3e
--- /dev/null
+++ b/security/i2pd/files/pkg-message.in
@@ -0,0 +1,8 @@
+[
+{ type: install
+ message: <<EOM
+You may want to increase default i2pd bandwidth limit by adding
+setting "bandwidth" parameter to "X" in %%ETCDIR%%/i2pd.conf
+EOM
+}
+]
diff --git a/security/i2pd/pkg-message b/security/i2pd/pkg-message
deleted file mode 100644
index 3f3db51dc389..000000000000
--- a/security/i2pd/pkg-message
+++ /dev/null
@@ -1,11 +0,0 @@
-[
-{ type: install
- message: <<EOM
-You may want to increase default i2pd bandwidth limit by adding
---bandwidth to i2pd_flags in /etc/rc.conf. Add the following to
-allow the highest traffic:
-
-i2pd_flags="--bandwidth X"
-EOM
-}
-]
diff --git a/security/i2pd/pkg-plist b/security/i2pd/pkg-plist
index 206910373a4a..e3b0677fa186 100644
--- a/security/i2pd/pkg-plist
+++ b/security/i2pd/pkg-plist
@@ -1,6 +1,7 @@
bin/i2pd
etc/newsyslog.conf.d/i2pd.conf
man/man1/i2pd.1.gz
+@sample %%ETCDIR%%/i2pd.conf.sample
@dir(%%USER%%,%%GROUP%%,755) /var/run/i2pd
@dir(%%USER%%,%%GROUP%%,755) /var/log/i2pd
@dir(%%USER%%,%%GROUP%%,755) /var/db/i2pd