Gentoo Archives: gentoo-commits

From: "Krzysztof Pawlik (nelchael)" <nelchael@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-servers/resin/files/4.0.6: resin.conf resin.init
Date: Mon, 19 Apr 2010 23:02:54
Message-Id: 20100419230248.13F702C04B@corvid.gentoo.org
1 nelchael 10/04/19 23:02:47
2
3 Added: resin.conf resin.init
4 Log:
5 Version bump.
6 (Portage version: 2.1.8.3/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 www-servers/resin/files/4.0.6/resin.conf
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/resin/files/4.0.6/resin.conf?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/resin/files/4.0.6/resin.conf?rev=1.1&content-type=text/plain
13
14 Index: resin.conf
15 ===================================================================
16 # JVM Runtime
17 # Using the default setting, it will determine your JVM from the system-vm
18 # set using java-config.
19 # See java-config(1) manual page for assistance in determining this value.
20
21 # You can override this value with whatever JDK you want.
22 # For a list of valid values for GENTOO_VM see output of
23 # java-config -L
24 #GENTOO_VM=sun-jdk-1.5
25
26 # Verbose starting and stopping? (yes/no, defaults to no)
27 #VERBOSE="yes"
28
29
30
31 1.1 www-servers/resin/files/4.0.6/resin.init
32
33 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/resin/files/4.0.6/resin.init?rev=1.1&view=markup
34 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/resin/files/4.0.6/resin.init?rev=1.1&content-type=text/plain
35
36 Index: resin.init
37 ===================================================================
38 #!/sbin/runscript
39 # Copyright 1999-2010 Gentoo Foundation
40 # Distributed under the terms of the GNU General Public License v2
41 # $Header: /var/cvsroot/gentoo-x86/www-servers/resin/files/4.0.6/resin.init,v 1.1 2010/04/19 23:02:47 nelchael Exp $
42
43 depend() {
44 need net
45 use dns logger mysql postgresql
46 }
47
48 runResin() {
49 JAVA_HOME=$(java-config -O)
50 [ -n "${GENTOO_VM}" ] && JAVA_HOME=$(java-config --select-vm="${GENTOO_VM}" -O)
51 export JAVA_HOME
52
53 local extraArgs=
54 if [ "${VERBOSE}" = "yes" ]; then
55 extraArgs="-verbose"
56 fi
57
58 local msg="${1}"
59 shift
60
61 local cmdline="${JAVA_HOME}/bin/java -jar /usr/share/resin/lib/resin.jar -conf /etc/resin/resin.xml -resin-home __RESIN_HOME__ -root-directory __RESIN_HOME__ ${extraArgs} ${@}"
62
63 ebegin "${msg}"
64 su - resin -c "${cmdline}"
65 eend $?
66 }
67
68 start() {
69 runResin "Starting Resin" "start"
70 }
71
72 stop() {
73 runResin "Stopping Resin" "shutdown"
74 }