From 3a33f2966f834d3520b03df59018e3d0295fcc69 Mon Sep 17 00:00:00 2001 From: BlackNoxis Date: Mon, 24 Aug 2015 20:45:13 +0300 Subject: [toxcore] adaugat toxcore --- net-libs/tox/files/initd | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'net-libs/tox/files/initd') diff --git a/net-libs/tox/files/initd b/net-libs/tox/files/initd index 728cb6f5..c500e9b4 100644 --- a/net-libs/tox/files/initd +++ b/net-libs/tox/files/initd @@ -1,8 +1,7 @@ #!/sbin/runscript -PIDFILE=/run/tox-dht-bootstrap.pid -LOGDIR=/var/log/tox-dht-bootstrap -RUNDIR=/var/lib/tox-dht-bootstrap +PIDDIR=/run/tox-bootstrapd +PIDFILE="${PIDDIR}"/tox-bootstrap.pid depend() { need net @@ -11,16 +10,13 @@ depend() { start() { ebegin "Starting tox-dht-bootstrap daemon" - [ -d "${LOGDIR}" ] || mkdir -p "${LOGDIR}" - [ -d "${RUNDIR}" ] || mkdir -p "${RUNDIR}" - chown -R nobody:nobody "${LOGDIR}" "${RUNDIR}" + [ -d "${PIDDIR}" ] || mkdir -p "${PIDDIR}" + chown -R ${TOX_USER}:${TOX_GROUP} "${PIDDIR}" start-stop-daemon --start \ - --pidfile "${PIDFILE}" --make-pidfile --background \ - --stdout "${LOGDIR}/stdout" --stderr "${LOGDIR}/stderr" \ - --chdir "${RUNDIR}" \ - --user=nobody --group=nobody \ - --exec /usr/bin/DHT_bootstrap + --pidfile "${PIDFILE}" \ + --user=${TOX_USER} --group=${TOX_GROUP} \ + --exec /usr/bin/tox-bootstrapd -- /etc/tox-bootstrapd.conf eend $? } -- cgit v1.2.3