2015-02-27 00:58:55 +00:00
|
|
|
#!/sbin/runscript
|
|
|
|
|
2015-07-31 00:55:23 +00:00
|
|
|
PIDDIR=/run/tox-bootstrapd
|
|
|
|
PIDFILE="${PIDDIR}"/tox-bootstrap.pid
|
2015-02-27 00:58:55 +00:00
|
|
|
|
|
|
|
depend() {
|
|
|
|
need net
|
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
|
|
|
ebegin "Starting tox-dht-bootstrap daemon"
|
|
|
|
|
2015-07-31 00:55:23 +00:00
|
|
|
[ -d "${PIDDIR}" ] || mkdir -p "${PIDDIR}"
|
|
|
|
chown -R ${TOX_USER}:${TOX_GROUP} "${PIDDIR}"
|
2015-02-27 00:58:55 +00:00
|
|
|
|
|
|
|
start-stop-daemon --start \
|
2015-07-31 00:55:23 +00:00
|
|
|
--pidfile "${PIDFILE}" \
|
|
|
|
--user=${TOX_USER} --group=${TOX_GROUP} \
|
|
|
|
--exec /usr/bin/tox-bootstrapd -- /etc/tox-bootstrapd.conf
|
2015-02-27 00:58:55 +00:00
|
|
|
|
|
|
|
eend $?
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
ebegin "Stopping tox-dht-bootstrap daemon"
|
|
|
|
|
|
|
|
start-stop-daemon --stop \
|
|
|
|
--pidfile "${PIDFILE}"
|
|
|
|
|
|
|
|
eend $?
|
|
|
|
}
|