summaryrefslogtreecommitdiff
path: root/packages/net-libs/toxcore/files/initd
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2018-07-22 01:51:51 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2018-07-22 01:51:51 +0300
commit58969e4f1757e77f7dabe4027430403a4abf6281 (patch)
treef9b516dc0b179dd69ebba835aa18e105fd6d4971 /packages/net-libs/toxcore/files/initd
parente43de2fe4ad1635a8275aadce38ff01aad4f6afe (diff)
tox redone, renamed to toxcore
qtox redone
Diffstat (limited to 'packages/net-libs/toxcore/files/initd')
-rw-r--r--packages/net-libs/toxcore/files/initd30
1 files changed, 30 insertions, 0 deletions
diff --git a/packages/net-libs/toxcore/files/initd b/packages/net-libs/toxcore/files/initd
new file mode 100644
index 0000000..101d329
--- /dev/null
+++ b/packages/net-libs/toxcore/files/initd
@@ -0,0 +1,30 @@
+#!/sbin/openrc-run
+
+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 -- --config /etc/tox-bootstrapd.conf
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping tox-dht-bootstrap daemon"
+
+ start-stop-daemon --stop \
+ --pidfile "${PIDFILE}"
+
+ eend $?
+}