commit:     51487f2d17caf789b2467dbd89804b9cb9a5fdd8
Author:     Josiah Mullins <JoMull01 <AT> protonmail <DOT> com>
AuthorDate: Wed Apr 24 21:12:54 2024 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Tue Jul 30 19:01:42 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51487f2d

net-libs/tox: Updated initd and tox-bootstrapd.service

Added some features from the tox main git tree. The
primary change is to increase the maximum number
of files that can be open. This is desired because
the tox dht daemon has around 600 files open; which
is near the default limit of 1024 (on some systems).

Signed-off-by: Josiah Mullins <JoMull01 <AT> protonmail.com>
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 net-libs/tox/files/initd                  | 2 ++
 net-libs/tox/files/tox-bootstrapd.service | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/net-libs/tox/files/initd b/net-libs/tox/files/initd
index 49880897a1a0..b5ef4cd4db41 100644
--- a/net-libs/tox/files/initd
+++ b/net-libs/tox/files/initd
@@ -16,6 +16,8 @@ start() {
        checkpath -d -q -o "${TOX_USER}":"${TOX_GROUP}" "${PIDDIR}"
        checkpath -d -q -o "${TOX_USER}":"${TOX_GROUP}" "${KEYSDIR}"
 
+       set rc_ulimts 4096
+
        start-stop-daemon --start \
                --pidfile "${PIDFILE}" \
                --user="${TOX_USER}" --group="${TOX_GROUP}" \

diff --git a/net-libs/tox/files/tox-bootstrapd.service 
b/net-libs/tox/files/tox-bootstrapd.service
index ae2f238cd60c..aec928c7054e 100644
--- a/net-libs/tox/files/tox-bootstrapd.service
+++ b/net-libs/tox/files/tox-bootstrapd.service
@@ -5,7 +5,11 @@ After=network.target
 [Service]
 User=tox
 Group=tox
+#Since the daemon can use around 600 tcp sockets,
+#increase the soft limit on open files to 4096
+LimitNOFILE=4096
 RuntimeDirectory=tox-bootstrapd
+RuntimeDirectoryMode=750
 PIDFile=/run/tox-bootstrapd/tox-bootstrapd.pid
 WorkingDirectory=/var/lib/tox-bootstrapd
 ExecStart=/usr/bin/tox-bootstrapd --config /etc/tox-bootstrapd.conf

Reply via email to