#!/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
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}" \
// 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