#!/sbin/runscript

NAME=gollum
PID=/var/run/${NAME}.pid

depend() {
	need net
}

start() {
	ebegin "Starting Gollum"
	start-stop-daemon --start \
		--name "${NAME}" \
		--user "${GOLLUM_USER}" \
		--pidfile "${PID}" \
		--make-pidfile --background \
		--exec gollum -- $GOLLUM_OPTS "$GOLLUM_BASE"
	eend $?
}

stop() {
	ebegin "Stopping Gollum"
	start-stop-daemon --stop \
		--name "${NAME}" \
		--user "${GOLLUM_USER}" \
		--pidfile "${PID}"
	eend $?
}
