summaryrefslogtreecommitdiff
blob: e5900e1409a01495f57c8e8a58291358d654b270 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-servers/resin/files/3.0.21/resin.init,v 1.2 2006/09/28 22:35:28 nelchael Exp $

depend() {
	need net
	use dns logger mysql postgresql
}

start()	{
	export JAVA_HOME=$(java-config --select-vm=${GENTOO_VM} -O)
	ebegin "Starting Resin"
	su - resin -c "${RESIN_HOME}/bin/httpd.sh ${JAVA_OPTS} -pid-dir /var/run/resin/ -java_home ${JAVA_HOME} -resin_home ${RESIN_HOME} -cp ${CLASSPATH} -stdout ${RESIN_OUT} -stderr ${RESIN_ERR} ${RESIN_START}"
	eend $?
}

stop()	{
	export JAVA_HOME=$(java-config --select-vm=${GENTOO_VM} -O)
	ebegin "Stopping Resin"
	su - resin -c "${RESIN_HOME}/bin/httpd.sh ${JAVA_OPTS} -pid-dir /var/run/resin/ ${RESIN_STOP}"
	eend $?
}