Manual instructions are from 2020, we gained /etc/login.d/* support
in 2022, so automate it.

(I have no idea if/how i2pd actually works.)

Feedback? OK?

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/i2pd/Makefile,v
diff -u -p -r1.22 Makefile
--- Makefile    13 Jan 2024 16:21:39 -0000      1.22
+++ Makefile    24 Jan 2024 22:21:26 -0000
@@ -3,6 +3,7 @@ COMMENT =       client for the I2P anonymous n
 GH_ACCOUNT =   PurpleI2P
 GH_PROJECT =   i2pd
 GH_TAGNAME =   2.50.2
+REVISION =     0
 
 CATEGORIES =   net
 HOMEPAGE =     https://i2pd.website
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/i2pd/pkg/PLIST,v
diff -u -p -r1.12 PLIST
--- pkg/PLIST   20 Dec 2023 22:19:44 -0000      1.12
+++ pkg/PLIST   24 Jan 2024 22:30:37 -0000
@@ -237,3 +237,7 @@ share/examples/i2pd/tunnels.conf
 @owner _i2pd
 @group _i2pd
 @sample ${SYSCONFDIR}/i2pd/tunnels.conf
+@owner
+@group
+share/examples/login.conf.d/i2pd
+@sample ${SYSCONFDIR}/login.conf.d/i2pd
Index: pkg/README
===================================================================
RCS file: /cvs/ports/net/i2pd/pkg/README,v
diff -u -p -r1.3 README
--- pkg/README  8 Nov 2022 12:41:42 -0000       1.3
+++ pkg/README  24 Jan 2024 22:24:29 -0000
@@ -5,20 +5,7 @@
 Resource Limits: File Descriptors
 =================================
 
-By default, the i2pd process runs in the login(1) class of "daemon".
-The default limits on file descriptors are insufficient to run i2pd; instead 
you
-should put the _i2pd user and process in their own login(1) class with tuned
-resources.
-You should also raise the system-wide maxfiles limit.
-
-1. Configure i2pd login class in the login.conf(5) file:
-
-        i2pd:\
-                :openfiles-cur=8192:\
-                :openfiles-max=8192:\
-                :tc=daemon:
-
-2. Adjust kern.maxfiles, if needed:
+You should raise the system-wide maxfiles limit:
 
        # sysctl kern.maxfiles=16000
        # echo "kern.maxfiles=16000" >> /etc/sysctl.conf
Index: pkg/i2pd.login
===================================================================
RCS file: pkg/i2pd.login
diff -N pkg/i2pd.login
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/i2pd.login      24 Jan 2024 22:23:46 -0000
@@ -0,0 +1,4 @@
+i2pd:\
+       :openfiles-cur=8192:\
+       :openfiles-max=8192:\
+       :tc=daemon:

Reply via email to