diff options
Diffstat (limited to 'net-libs/tox/files/initd')
-rw-r--r-- | net-libs/tox/files/initd | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/net-libs/tox/files/initd b/net-libs/tox/files/initd new file mode 100644 index 000000000000..84ae908af5a7 --- /dev/null +++ b/net-libs/tox/files/initd @@ -0,0 +1,30 @@ +#!/sbin/runscript + +PIDDIR=/run/tox-bootstrapd +PIDFILE="${PIDDIR}"/tox-bootstrap.pid + +depend() { + need net +} + +start() { + ebegin "Starting tox-dht-bootstrap daemon" + + checkpath -d -q -o "${TOX_USER}":"${TOX_GROUP}" "${PIDDIR}" + + start-stop-daemon --start \ + --pidfile "${PIDFILE}" \ + --user="${TOX_USER}" --group="${TOX_GROUP}" \ + --exec /usr/bin/tox-bootstrapd -- /etc/tox-bootstrapd.conf + + eend $? +} + +stop() { + ebegin "Stopping tox-dht-bootstrap daemon" + + start-stop-daemon --stop \ + --pidfile "${PIDFILE}" + + eend $? +} |