summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosiah Mullins <jomull01@protonmail.com>2020-01-09 12:31:44 -0500
committerJoonas Niilola <juippis@gentoo.org>2020-01-13 08:09:43 +0200
commit606a78b496eff09146c70ba53059d5a5c755216c (patch)
tree8a725f47a78902018d6b5bb9d68c191231de4002 /net-libs/tox
parentwww-apps/gitea: remove unused patch (diff)
downloadgentoo-606a78b496eff09146c70ba53059d5a5c755216c.tar.gz
gentoo-606a78b496eff09146c70ba53059d5a5c755216c.tar.bz2
gentoo-606a78b496eff09146c70ba53059d5a5c755216c.zip
net-libs/tox: fix to openrc init script.
This commit unifies the location of the PID file for the daemon in both the openrc script and the daemon's config file. In addition,the script now checks the keys directory for existence and correct permissions. Signed-off-by: Josiah M. Mullins <JoMull01@protonmail.com> Closes: https://bugs.gentoo.org/691772 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-libs/tox')
-rw-r--r--net-libs/tox/files/initd6
-rw-r--r--net-libs/tox/files/tox-bootstrapd.conf11
2 files changed, 12 insertions, 5 deletions
diff --git a/net-libs/tox/files/initd b/net-libs/tox/files/initd
index 101d3297056f..49880897a1a0 100644
--- a/net-libs/tox/files/initd
+++ b/net-libs/tox/files/initd
@@ -1,7 +1,10 @@
#!/sbin/openrc-run
PIDDIR=/run/tox-bootstrapd
-PIDFILE="${PIDDIR}"/tox-bootstrap.pid
+PIDFILE="${PIDDIR}"/tox-bootstrapd.pid
+KEYSDIR=/var/lib/tox-bootstrapd
+TOX_USER=tox
+TOX_GROUP=tox
depend() {
need net
@@ -11,6 +14,7 @@ start() {
ebegin "Starting tox-dht-bootstrap daemon"
checkpath -d -q -o "${TOX_USER}":"${TOX_GROUP}" "${PIDDIR}"
+ checkpath -d -q -o "${TOX_USER}":"${TOX_GROUP}" "${KEYSDIR}"
start-stop-daemon --start \
--pidfile "${PIDFILE}" \
diff --git a/net-libs/tox/files/tox-bootstrapd.conf b/net-libs/tox/files/tox-bootstrapd.conf
index 3413f5907d46..34836de6287d 100644
--- a/net-libs/tox/files/tox-bootstrapd.conf
+++ b/net-libs/tox/files/tox-bootstrapd.conf
@@ -5,13 +5,16 @@ port = 33445
// A key file is like a password, so keep it where no one can read it.
// If there is no key file, a new one will be generated.
-// The daemon should have permission to read/write it.
+// If you change this directory, either change the keys directory
+// in the /etc/init.d/tox-dht-daemon script or manually set the
+// new directory to have user "tox" and group "tox".
keys_file_path = "/var/lib/tox-bootstrapd/keys"
// The PID file written to by the daemon.
-// Make sure that the user that daemon runs as has permissions to write to the
-// PID file.
-pid_file_path = "/var/run/tox-bootstrapd/tox-bootstrapd.pid"
+// Make sure that the user that daemon runs as has permissions to
+// write to the PID file. If you change this file, please edit the
+// etc/init.d/tox-dht-daemon script to reflect the change.
+pid_file_path = "/run/tox-bootstrapd/tox-bootstrapd.pid"
// Enable IPv6.
enable_ipv6 = true