#!/sbin/openrc-run
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

PID_DIR=/var/run/saku

depend() {
	use dns
	need net
}

start() {
	mkdir -p $PID_DIR
	rm -f ${PID_DIR}/pid.txt
	ebegin "Starting p2p bbs: saku"
	start-stop-daemon --start -u saku -g saku --quiet -b \
	    -p ${PID_DIR}/pid.txt --exec /usr/bin/saku
	eend $?
}

stop() {
	ebegin "Stopping p2p bbs: saku"
	start-stop-daemon --stop --quiet -p ${PID_DIR}/pid.txt
	eend $?
}
