View | Details | Raw Unified | Return to bug 77989
Collapse All | Expand All

(-)./Makefile (-36 / +28 lines)
Lines 2-12 Link Here
2
# Whom:                                Jean-Baptiste Quenot <jb.quenot@caraldi.com>
2
# Whom:                                Jean-Baptiste Quenot <jb.quenot@caraldi.com>
3
# Date Created:                        2003-09-29 14:17:14
3
# Date Created:                        2003-09-29 14:17:14
4
#
4
#
5
# $FreeBSD: ports/www/resin3/Makefile,v 1.7 2004/10/14 06:37:41 vanilla Exp $
5
# $FreeBSD: ports/www/resin3/Makefile,v 1.6 2004/06/24 07:43:26 vs Exp $
6
#
6
#
7
7
8
PORTNAME=		resin
8
PORTNAME=		resin
9
PORTVERSION=		3.0.9
9
PORTVERSION=		3.0.11
10
CATEGORIES=		www java
10
CATEGORIES=		www java
11
MASTER_SITES=		http://www.caucho.com/download/
11
MASTER_SITES=		http://www.caucho.com/download/
12
12
Lines 15-22 Link Here
15
15
16
USE_JAVA=		1.2+
16
USE_JAVA=		1.2+
17
HAS_CONFIGURE=		yes
17
HAS_CONFIGURE=		yes
18
USE_GMAKE=		yes
18
USE_PYTHON=		yes
19
USE_PERL5_RUN=		yes
20
USE_REINPLACE=		yes
19
USE_REINPLACE=		yes
21
20
22
# Customizable settings
21
# Customizable settings
Lines 33-43 Link Here
33
APP_HOME?=		${PREFIX}/${APP_NAME}
32
APP_HOME?=		${PREFIX}/${APP_NAME}
34
WITH_APACHE?=		NO
33
WITH_APACHE?=		NO
35
WITH_APACHE2?=		NO
34
WITH_APACHE2?=		NO
36
PID_FILE?=		/var/run/${APP_NAME}.pid
35
PID_FILE?=		${APP_HOME}/${APP_NAME}.pid
36
LOG_FILE?=		${APP_HOME}/${APP_NAME}.log
37
37
38
# Other settings
38
# Other settings
39
APXS?=			${LOCALBASE}/sbin/apxs
39
APXS?=			${LOCALBASE}/sbin/apxs
40
MOD_DIR?=		`${APXS} -q LIBEXECDIR`
41
PKGINSTALL=		${WRKDIR}/pkg-install
40
PKGINSTALL=		${WRKDIR}/pkg-install
42
PKGDEINSTALL=		${WRKDIR}/pkg-deinstall
41
PKGDEINSTALL=		${WRKDIR}/pkg-deinstall
43
PKGMESSAGE=		${WRKDIR}/pkg-message
42
PKGMESSAGE=		${WRKDIR}/pkg-message
Lines 51-59 Link Here
51
			${FILESDIR}/install.sh \
50
			${FILESDIR}/install.sh \
52
			${FILESDIR}/pkg-message.in \
51
			${FILESDIR}/pkg-message.in \
53
			${WRKSRC}/conf/resin.conf \
52
			${WRKSRC}/conf/resin.conf \
54
			${WRKSRC}/bin/wrapper.pl.in \
53
			${FILESDIR}/resinctl \
55
			${FILESDIR}/resin.sh.in
54
			${FILESDIR}/resin.sh.in
56
COPYDIRS=		lib webapps
55
COPYDIRS=		lib libexec webapps
57
56
58
.include <bsd.port.pre.mk>
57
.include <bsd.port.pre.mk>
59
58
Lines 88-101 Link Here
88
PLIST_SUB+=		APP_NAME=${APP_NAME}
87
PLIST_SUB+=		APP_NAME=${APP_NAME}
89
PLIST_SUB+=		APXS=${APXS}
88
PLIST_SUB+=		APXS=${APXS}
90
89
91
.if ((defined(WITH_APACHE) && (${WITH_APACHE} == yes || ${WITH_APACHE} == YES)) \
92
|| (defined(WITH_APACHE2) && (${WITH_APACHE2} == yes || ${WITH_APACHE2} == YES)))
93
LIBEXECDIR!=		${APXS} -q LIBEXECDIR
94
SYSCONFDIR!=		${APXS} -q SYSCONFDIR
95
CONFIGURE_ARGS+=	--with-apache-libexec=${LIBEXECDIR}
96
CONFIGURE_ARGS+=	--with-apache-conf=${SYSCONFDIR}
97
.endif
98
99
SUBSTITUTIONS=		-e "s|%%APP_HOME%%|${APP_HOME}|g" \
90
SUBSTITUTIONS=		-e "s|%%APP_HOME%%|${APP_HOME}|g" \
100
			-e "s|%%APP_NAME%%|${APP_NAME}|g" \
91
			-e "s|%%APP_NAME%%|${APP_NAME}|g" \
101
			-e "s|%%APXS%%|${APXS}|g" \
92
			-e "s|%%APXS%%|${APXS}|g" \
Lines 104-110 Link Here
104
			-e "s|%%GROUP%%|${GROUP}|g" \
95
			-e "s|%%GROUP%%|${GROUP}|g" \
105
			-e "s|%%GID%%|${GID}|g" \
96
			-e "s|%%GID%%|${GID}|g" \
106
			-e "s|%%JAVA_HOME%%|${JAVA_HOME}|g" \
97
			-e "s|%%JAVA_HOME%%|${JAVA_HOME}|g" \
107
			-e "s|%%PERL%%|${PERL}|g" \
98
			-e "s|%%JAVA%%|${JAVA}|g" \
99
			-e "s|%%LOG_FILE%%|${LOG_FILE}|g" \
100
			-e "s|%%PYTHON_CMD%%|${PYTHON_CMD}|g" \
108
			-e "s|%%PID_FILE%%|${PID_FILE}|g" \
101
			-e "s|%%PID_FILE%%|${PID_FILE}|g" \
109
			-e "s|%%PORT%%|${PORT}|g" \
102
			-e "s|%%PORT%%|${PORT}|g" \
110
			-e "s|%%PORTNAME%%|${PORTNAME}|g" \
103
			-e "s|%%PORTNAME%%|${PORTNAME}|g" \
Lines 116-154 Link Here
116
109
117
post-patch:
110
post-patch:
118
.for FILE in ${REINPLACE_FILES}
111
.for FILE in ${REINPLACE_FILES}
119
			@${REINPLACE_CMD} ${SUBSTITUTIONS} ${FILE}
112
	@${REINPLACE_CMD} ${SUBSTITUTIONS} ${FILE}
120
.endfor
113
.endfor
121
.for FILE in ${REPLACE_FILES}
114
.for FILE in ${REPLACE_FILES}
122
			@${SED} ${SUBSTITUTIONS} ${FILE} > ${WRKDIR}/`basename ${FILE}`
115
	@${SED} ${SUBSTITUTIONS} ${FILE} > ${WRKDIR}/`basename ${FILE}`
123
.endfor
116
.endfor
124
			@fmt -w 80 < ${WRKDIR}/pkg-message.in > ${PKGMESSAGE}
117
	@fmt -w 80 < ${WRKDIR}/pkg-message.in > ${PKGMESSAGE}
125
.if (defined(WITH_APACHE2) && (${WITH_APACHE2} == yes || ${WITH_APACHE2} == YES) || \
118
.if (defined(WITH_APACHE2) && (${WITH_APACHE2} == yes || ${WITH_APACHE2} == YES) || \
126
defined(WITH_APACHE) && (${WITH_APACHE} == yes || ${WITH_APACHE} == YES))
119
defined(WITH_APACHE) && (${WITH_APACHE} == yes || ${WITH_APACHE} == YES))
127
			@${ECHO_CMD} >> ${PKGMESSAGE}
120
	@${ECHO_CMD} >> ${PKGMESSAGE}
128
			@${ECHO_CMD} The Resin Apache module mod_caucho has been activated \
121
	@${ECHO_CMD} The Resin Apache module mod_caucho has been activated \
129
			    in the Apache configuration file, where you should also \
122
	    in the Apache configuration file, where you should also \
130
			    add a line to specify the location of the Resin configuration \
123
	    add a line to specify the location of the Resin configuration \
131
			    server, for example: | fmt -w 80 >> ${PKGMESSAGE}
124
	    server, for example: | fmt -w 80 >> ${PKGMESSAGE}
132
			@${ECHO_CMD} >> ${PKGMESSAGE}
125
	@${ECHO_CMD} >> ${PKGMESSAGE}
133
			@${ECHO_CMD} "<IfModule mod_caucho.c>" >> ${PKGMESSAGE}
126
	@${ECHO_CMD} "<IfModule mod_caucho.c>" >> ${PKGMESSAGE}
134
.if (defined(WITH_APACHE2) && (${WITH_APACHE2} == yes || ${WITH_APACHE2} == YES))
127
.if (defined(WITH_APACHE2) && (${WITH_APACHE2} == yes || ${WITH_APACHE2} == YES))
135
			@${ECHO_CMD} "    ResinConfigServer localhost 6802" >> ${PKGMESSAGE}
128
	@${ECHO_CMD} "    ResinConfigServer localhost 6802" >> ${PKGMESSAGE}
136
.endif
129
.endif
137
.if (defined(WITH_APACHE) && (${WITH_APACHE} == yes || ${WITH_APACHE} == YES))
130
.if (defined(WITH_APACHE) && (${WITH_APACHE} == yes || ${WITH_APACHE} == YES))
138
			@${ECHO_CMD} "    CauchoConfigFile ${PREFIX}/etc/${APP_NAME}/resin.xml" >> ${PKGMESSAGE}
131
			@${ECHO_CMD} "    CauchoConfigFile ${PREFIX}/etc/${APP_NAME}/resin.xml" >> ${PKGMESSAGE}
139
.endif
132
.endif
140
			@${ECHO_CMD} "</IfModule>" >> ${PKGMESSAGE}
133
			@${ECHO_CMD} "</IfModule>" >> ${PKGMESSAGE}
141
.endif
134
.endif
142
			@${MV} ${WRKDIR}/wrapper.pl.in ${WRKSRC}/bin/wrapper.pl.in
143
135
144
# Resin does not handle installation, so proceed now
136
# Resin does not handle installation, so proceed now
145
post-install:
137
post-install:
146
			@${SH} ${WRKDIR}/install.sh
138
	@${SETENV} RUNASUSER=${RUNASUSER} GROUP=${GROUP} ${SH} ${WRKDIR}/install.sh
147
			@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
139
	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
148
			@${ECHO_CMD}
140
	@${ECHO_CMD}
149
			@${ECHO_CMD} "********************************************************************************"
141
	@${ECHO_CMD} "********************************************************************************"
150
			@${CAT} ${PKGMESSAGE}
142
	@${CAT} ${PKGMESSAGE}
151
			@${ECHO_CMD} "********************************************************************************"
143
	@${ECHO_CMD} "********************************************************************************"
152
			@${ECHO_CMD}
144
	@${ECHO_CMD}
153
145
154
.include <bsd.port.post.mk>
146
.include <bsd.port.post.mk>
(-)./distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
MD5 (resin-3.0.9.tar.gz) = 97a68da3582b7cd98c9e729f136abf27
1
MD5 (resin-3.0.11.tar.gz) = 952592162531aaf688cf0172784b1933
2
SIZE (resin-3.0.9.tar.gz) = 6326402
2
SIZE (resin-3.0.11.tar.gz) = 6954237
(-)./files/install.sh (-2 / +2 lines)
Lines 33-39 Link Here
33
chmod 755 %%PREFIX%%/etc/rc.d/%%APP_NAME%%.sh
33
chmod 755 %%PREFIX%%/etc/rc.d/%%APP_NAME%%.sh
34
echo Installed %%PREFIX%%/etc/rc.d/%%APP_NAME%%.sh
34
echo Installed %%PREFIX%%/etc/rc.d/%%APP_NAME%%.sh
35
35
36
install %%WRKSRC%%/bin/wrapper.pl %%PREFIX%%/sbin/%%APP_NAME%%ctl
36
install %%WRKDIR%%/resinctl %%PREFIX%%/sbin/%%APP_NAME%%ctl
37
echo Installed %%PREFIX%%/sbin/%%APP_NAME%%ctl
37
echo Installed %%PREFIX%%/sbin/%%APP_NAME%%ctl
38
38
39
test -d %%APP_HOME%% || mkdir %%APP_HOME%%
39
test -d %%APP_HOME%% || mkdir %%APP_HOME%%
Lines 50-53 Link Here
50
( cd %%WRKSRC%% && find %%COPYDIRS%% -type d -empty -delete )
50
( cd %%WRKSRC%% && find %%COPYDIRS%% -type d -empty -delete )
51
51
52
echo Installing in %%APP_HOME%%
52
echo Installing in %%APP_HOME%%
53
list | xargs tar -C %%WRKSRC%% -cf- | tar -C %%APP_HOME%% -xpf-
53
list | ( cd %%WRKSRC%% && cpio -pdm -L -R $RUNASUSER:$GROUP %%APP_HOME%% )
(-)./files/patch-wrapper (-8 lines)
Lines 1-8 Link Here
1
--- bin/wrapper.pl.in.orig	Sat Oct  4 09:45:23 2003
2
+++ bin/wrapper.pl.in	Sat Oct  4 09:45:43 2003
3
@@ -1,4 +1,4 @@
4
-#! @PERL@
5
+#! %%PERL%%
6
 #
7
 # Copyright(c) 1998-2002 Caucho Technology
8
 #
(-)./files/pkg-message.in (-4 / +10 lines)
Lines 1-8 Link Here
1
Resin is now installed in %%APP_HOME%%
1
Resin is now installed in %%APP_HOME%%
2
2
3
You may want to start it using the
3
You may want to activate it in /etc/rc.conf:
4
startup script installed as %%PREFIX%%/etc/rc.d/%%APP_NAME%%.sh and then point
4
5
your web browser to the default home page at http://localhost:%%PORT%%/ to read
5
%%APP_NAME%%_enable="YES"
6
the documentation and test the samples.
6
7
Then start it:
8
9
env - %%PREFIX%%/etc/rc.d/%%APP_NAME%%.sh start
10
11
And point your web browser to the default home page at
12
http://localhost:%%PORT%%/ to read the documentation and test the samples.
7
13
8
Resin configuration is located at %%PREFIX%%/etc/%%APP_NAME%%/resin.xml
14
Resin configuration is located at %%PREFIX%%/etc/%%APP_NAME%%/resin.xml
(-)./files/resin.sh.in (-48 / +25 lines)
Lines 1-54 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# Resin startup script.
3
# $FreeBSD: ports/www/resin2/files/resin.sh.in,v 1.2 2004/07/02 22:10:15 glewis Exp $
4
#
4
#
5
# Borrowed from jakarta-tomcat41
5
6
# PROVIDE: %%APP_NAME%%
7
6
#
8
#
7
# $FreeBSD: ports/www/resin3/files/resin.sh.in,v 1.3 2004/06/24 07:43:27 vs Exp $
9
# Add the following line to /etc/rc.conf to enable %%APP_NAME%%:
8
#
10
#
11
# %%APP_NAME%%_enable="YES"
12
#
13
14
. /etc/rc.subr
15
16
name=%%APP_NAME%%
17
rcvar=`set_rcvar`
18
19
command=%%PREFIX%%/sbin/%%APP_NAME%%ctl
20
command_args="$1"
21
pidfile=%%PID_FILE%%
22
procname=%%JAVA%%
23
24
# set defaults
25
26
%%APP_NAME%%_enable=${%%APP_NAME%%_enable:-"NO"}
27
%%APP_NAME%%_user=${%%APP_NAME%%_user:-"www"}
28
%%APP_NAME%%_group=${%%APP_NAME%%_group:-"www"}
9
29
10
# Determine PREFIX
30
load_rc_config ${name}
11
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${0##*/}\$"); then
31
run_rc_command "$1"
12
    echo "$0: Cannot determine the PREFIX" >&2
13
    exit 1
14
fi
15
16
# Set some variables
17
MYSELF=`basename $0`
18
ARGS="-conf $PREFIX/etc/%%APP_NAME%%/resin.xml \
19
-chdir \
20
-name %%APP_NAME%% \
21
-class com.caucho.server.resin.Resin \
22
-pid %%PID_FILE%%"
23
PATH=/usr/sbin:/usr/bin:/bin
24
25
unset CLASSPATH
26
export JAVA_HOME=%%JAVA_HOME%%
27
export RESIN_HOME=$PREFIX/%%APP_NAME%%
28
29
set -e
30
31
case "$1" in
32
    start)
33
        echo -n ' '
34
        truncate -s 0 %%PID_FILE%%
35
        chown %%RUNASUSER%%:%%GROUP%% %%PID_FILE%%
36
        chmod 600 %%PID_FILE%%
37
        su -f -m %%RUNASUSER%% -c "exec $PREFIX/sbin/%%APP_NAME%%ctl $ARGS start" \
38
            >/dev/null && echo -n '%%APP_NAME%%'
39
        ;;
40
41
    stop)
42
        echo -n ' '
43
        chown %%RUNASUSER%%:%%GROUP%% %%PID_FILE%%
44
        chmod 600 %%PID_FILE%%
45
        su -f -m %%RUNASUSER%% -c "exec $PREFIX/sbin/%%APP_NAME%%ctl $ARGS stop" \
46
            >/dev/null 2>&1 ; echo -n '%%APP_NAME%%'
47
        ;;
48
    *)
49
        echo ""
50
        echo "Usage: ${MYSELF} { start | stop }"
51
        echo ""
52
        exit 64
53
        ;;
54
esac
(-)./files/resinctl (+190 lines)
Line 0 Link Here
1
#! %%PYTHON_CMD%%
2
3
################################################################################
4
# Author:        Jean-Baptiste Quenot <jb.quenot@caraldi.com>
5
# Purpose:       Manage resin pid file and log files
6
# Date Created:  2005-01-21 15:43:19
7
# Revision:      $FreeBSD: ports/www/cocoon/files/cocoonctl,v 1.1 2004/07/01 22:30:19 glewis Exp $
8
################################################################################
9
# Copyright (c) 2004, Jean-Baptiste Quenot <jb.quenot@caraldi.com>
10
# All rights reserved.
11
#
12
# Redistribution and use in source and binary forms, with or without
13
# modification, are permitted provided that the following conditions are met:
14
#
15
# * Redistributions of source code must retain the above copyright notice, this
16
#   list of conditions and the following disclaimer.
17
# * Redistributions in binary form must reproduce the above copyright notice,
18
#   this list of conditions and the following disclaimer in the documentation
19
#   and/or other materials provided with the distribution.
20
# * The name of the contributors may not be used to endorse or promote products
21
#   derived from this software without specific prior written permission.
22
#
23
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
27
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
29
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
################################################################################
34
#
35
# Files handled by this script (pid file, log files) must reside in a writable
36
# directory, ie the directory must be owned by the user running the program.
37
38
import sys, os, signal, time, stat, re
39
40
def classpath():
41
    classpath = []
42
    resin_libdir = APP_HOME + "/lib"
43
    java_libdir = os.environ['JAVA_HOME'] + "/lib"
44
    for libdir in [resin_libdir, java_libdir]:
45
        for file in os.listdir(libdir):
46
            if re.search("\.jar$", file):
47
                classpath.append(libdir + "/" + file)
48
    return ':'.join(classpath)
49
50
#    -socketwait 12345
51
#    -stdout $APP_HOME/log/stdout.log
52
#    -stderr $APP_HOME/log/stderr.log
53
54
def readProcessId():
55
    f = open(PID_FILE, 'r')
56
    pid = int(f.readline())
57
    f.close()
58
    return pid
59
60
def isProgramRunning(pid):
61
    # Send a dummy signal to the process.  If it died, an exception is
62
    # thrown
63
    try:
64
        os.kill(pid, signal.SIGCONT)
65
        return 1
66
    except OSError:
67
        return 0
68
69
def usage():
70
    print >> sys.stderr, "Usage: %s {start|stop|restart}" % sys.argv[0]
71
72
def start():
73
    cwd = os.getcwd()
74
    if os.path.exists(PID_FILE):
75
        # Read the process id
76
        pid = readProcessId()
77
78
        if isProgramRunning(pid):
79
            print >> sys.stderr, '%s already started' % APP_NAME
80
            sys.exit(3)
81
82
    if not(os.path.exists(COMMAND)):
83
        print >> sys.stderr, '%s cannot be found' % COMMAND
84
        sys.exit(3)
85
86
    # Append program output to a log file
87
    l = open(LOG_FILE, 'a')
88
    orig_stderr = os.dup(sys.stderr.fileno())
89
    os.dup2(l.fileno(), sys.stdout.fileno())
90
    os.dup2(l.fileno(), sys.stderr.fileno())
91
92
    finfo = os.stat(COMMAND)[stat.ST_MODE]
93
    executable = stat.S_IMODE(finfo) & 0111
94
    if not(executable):
95
        sys.stderr = os.fdopen(orig_stderr, 'w')
96
        print >> sys.stderr, 'Cannot run %s, execute bit is missing' % COMMAND
97
        sys.exit(5)
98
99
    if APP_HOME:
100
        # Change current directory to APP_HOME
101
        os.chdir(APP_HOME)
102
103
    # Start program in the background
104
    pid = os.spawnv(os.P_NOWAIT, COMMAND, ARGS)
105
106
    # Wait a little
107
    time.sleep(.4)
108
    (unused_pid, status) = os.waitpid(pid, os.WNOHANG)
109
110
    # Check program exit status, if available
111
    if unused_pid != 0 and os.WIFEXITED(status):
112
        sys.stderr = os.fdopen(orig_stderr, 'w')
113
        print >> sys.stderr, 'Could not start %s.  Check %s for errors.' % (APP_NAME, LOG_FILE)
114
        sys.exit(2)
115
116
    # It's alive, so write down the process id
117
    os.chdir(cwd)
118
    f = open(PID_FILE, 'w')
119
    print >> f, pid
120
    f.close()
121
122
def warnNotRunning():
123
    if sys.argv[1] == "stop":
124
        print >> sys.stderr, '%s is not running' % APP_NAME
125
    else:
126
        print >> sys.stderr, 'Warning: %s was not running' % APP_NAME
127
128
def cleanup():
129
    os.unlink(PID_FILE)
130
131
def stop():
132
    if os.path.exists(PID_FILE):
133
        # Read the process id
134
        pid = readProcessId()
135
    else:
136
        warnNotRunning()
137
        return
138
139
    if not(isProgramRunning(pid)):
140
        warnNotRunning()
141
        cleanup()
142
        return
143
144
    # Terminate program
145
    os.kill(pid, signal.SIGTERM)
146
147
    while isProgramRunning(pid):
148
        time.sleep(.1)
149
150
    cleanup()
151
152
if __name__ == '__main__':
153
    LOG_FILE = "%%LOG_FILE%%"
154
    APP_NAME = "%%APP_NAME%%"
155
    APP_HOME = "%%APP_HOME%%"
156
    CONTROL_PROGRAM = "%%APP_NAME%%ctl"
157
    PID_FILE = "%%PID_FILE%%"
158
    COMMAND = "%%JAVA%%"
159
    ARGS = [COMMAND]
160
161
    if os.environ.has_key('JAVA_OPTS'):
162
        ARGS += os.environ['JAVA_OPTS'].split(" ")
163
164
    ARGS += [
165
        "-Dresin.home=%%APP_HOME%%",
166
        "-Djava.util.logging.manager=com.caucho.log.LogManagerImpl",
167
        "com.caucho.server.resin.Resin",
168
        "-conf", "%%PREFIX%%/etc/%%APP_NAME%%/resin.xml"
169
        ]
170
171
    os.environ['JAVA_HOME'] = "%%JAVA_HOME%%"
172
    os.environ['CLASSPATH'] = classpath()
173
174
    if len(sys.argv) != 2:
175
        usage()
176
        sys.exit(1)
177
178
    if sys.argv[1] == "start":
179
        start()
180
181
    elif sys.argv[1] == "stop":
182
        stop()
183
184
    elif sys.argv[1] == "restart":
185
        stop()
186
        start()
187
188
    else:
189
        usage()
190
        sys.exit(1)
(-)./pkg-plist (+6 lines)
Lines 1-5 Link Here
1
%%APP_NAME%%/lib/LICENSE.isorelax
1
%%APP_NAME%%/lib/LICENSE.isorelax
2
%%APP_NAME%%/lib/LICENSE.retroweaver
2
%%APP_NAME%%/lib/LICENSE.retroweaver
3
%%APP_NAME%%/lib/aopalliance.jar
4
%%APP_NAME%%/lib/boot.jar
3
%%APP_NAME%%/lib/ejb-20.jar
5
%%APP_NAME%%/lib/ejb-20.jar
4
%%APP_NAME%%/lib/ejb-30.jar
6
%%APP_NAME%%/lib/ejb-30.jar
5
%%APP_NAME%%/lib/isorelax.jar
7
%%APP_NAME%%/lib/isorelax.jar
Lines 14-23 Link Here
14
%%APP_NAME%%/lib/portlet-10.jar
16
%%APP_NAME%%/lib/portlet-10.jar
15
%%APP_NAME%%/lib/resin-jdk15.jar
17
%%APP_NAME%%/lib/resin-jdk15.jar
16
%%APP_NAME%%/lib/resin.jar
18
%%APP_NAME%%/lib/resin.jar
19
%%APP_NAME%%/lib/resinboot.jar
17
%%APP_NAME%%/lib/retroweaver.jar
20
%%APP_NAME%%/lib/retroweaver.jar
21
%%APP_NAME%%/lib/saaj.jar
18
%%APP_NAME%%/lib/webutil.jar
22
%%APP_NAME%%/lib/webutil.jar
19
%%APP_NAME%%/webapps/ROOT/index.jsp
23
%%APP_NAME%%/webapps/ROOT/index.jsp
20
%%APP_NAME%%/webapps/resin-doc.war
24
%%APP_NAME%%/webapps/resin-doc.war
25
%%APP_NAME%%/libexec/libresin_os.so
21
etc/%%APP_NAME%%/app-default.xml
26
etc/%%APP_NAME%%/app-default.xml
22
etc/rc.d/%%APP_NAME%%.sh
27
etc/rc.d/%%APP_NAME%%.sh
23
sbin/%%APP_NAME%%ctl
28
sbin/%%APP_NAME%%ctl
Lines 27-32 Link Here
27
@dirrm %%APP_NAME%%/lib
32
@dirrm %%APP_NAME%%/lib
28
@dirrm %%APP_NAME%%/webapps/ROOT
33
@dirrm %%APP_NAME%%/webapps/ROOT
29
@dirrm %%APP_NAME%%/webapps
34
@dirrm %%APP_NAME%%/webapps
35
@dirrm %%APP_NAME%%/libexec
30
@dirrm %%APP_NAME%%
36
@dirrm %%APP_NAME%%
31
@unexec if cmp -s %D/etc/%%APP_NAME%%/resin.xml %D/etc/%%APP_NAME%%/resin.xml-dist; then rm -f %D/etc/%%APP_NAME%%/resin.xml ; else echo If permanently deleting this package, %D/etc/%%APP_NAME%%/resin.xml must be removed manually; fi
37
@unexec if cmp -s %D/etc/%%APP_NAME%%/resin.xml %D/etc/%%APP_NAME%%/resin.xml-dist; then rm -f %D/etc/%%APP_NAME%%/resin.xml ; else echo If permanently deleting this package, %D/etc/%%APP_NAME%%/resin.xml must be removed manually; fi
32
etc/%%APP_NAME%%/resin.xml-dist
38
etc/%%APP_NAME%%/resin.xml-dist

Return to bug 77989