#!/sbin/openrc-run

command=/usr/bin/spawn-fcgi
command_args="-F 4 -d / -u rt -g rt -s /run/rt-fcgi.sock -M 0660 -P /run/rt-fcgi.pid /usr/share/request-tracker5/libexec/rt-server.fcgi"
pidfile=/run/rt-fcgi.pid

stop()
{
	cat $pidfile | xargs kill
	for i in {1..10}; do
		if pgrep rt-server.fcgi > /dev/null; then
			sleep 1
		else
			break
		fi
	done
}
