aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authoralex <alex@FreeBSD.org>2001-05-22 03:21:50 +0800
committeralex <alex@FreeBSD.org>2001-05-22 03:21:50 +0800
commit08e6a02cd17c3527063791bb60603342869006ec (patch)
tree8496a4c7ec007e1e23718fea1fb2871aca461d83 /java
parent3ca821482f0ea891a98ac3085b95c2fb5adcdb47 (diff)
downloadfreebsd-ports-gnome-08e6a02cd17c3527063791bb60603342869006ec.tar.gz
freebsd-ports-gnome-08e6a02cd17c3527063791bb60603342869006ec.tar.zst
freebsd-ports-gnome-08e6a02cd17c3527063791bb60603342869006ec.zip
From the PR:
The previous version of this port contains a bug in the orionctl script. I didn't properly test it. This time I extensively tested it. It has also been improved to detect more possible error conditions and exit gracefully in such cases. Bump PORTREVISION. Update plist. PR: 27501 Submitted by: maintainer
Diffstat (limited to 'java')
-rw-r--r--java/orion/Makefile5
-rw-r--r--java/orion/files/orionctl54
-rw-r--r--java/orion/pkg-plist1
3 files changed, 48 insertions, 12 deletions
diff --git a/java/orion/Makefile b/java/orion/Makefile
index 7de0d026c6a4..3f2b589adae0 100644
--- a/java/orion/Makefile
+++ b/java/orion/Makefile
@@ -7,13 +7,12 @@
PORTNAME= orion
PORTVERSION= 1.4.5
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= java www
MASTER_SITES= ftp://ftp.sunet.se/pub/database/utils/orionserver/ \
http://www.jollem.com/ \
http://www.sebster.com/~elvis/
DISTNAME= ${PORTNAME}${PORTVERSION}
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= ernst@jollem.com
@@ -24,7 +23,6 @@ NO_BUILD= YES
WRKSRC= ${WRKDIR}/${PORTNAME}
ORION_DESTDIR= ${PREFIX}/${DISTNAME}
-ORION_LINKDIR= ${PREFIX}/${PORTNAME}
PORTTITLE= Orion Server
ORIONCTL_NAME= orionctl
ORIONCTL_DEST= ${PREFIX}/bin/${ORIONCTL_NAME}
@@ -43,6 +41,7 @@ do-install:
@${CP} ${FILESDIR}/${ORIONCTL_NAME} ${ORIONCTL_DEST}
@${CHMOD} 755 ${ORIONCTL_DEST}
@${LN} -s ${ORIONCTL_DEST} ${RC_SCRIPT}
+ @${MKDIR} ${ORION_DESTDIR}/application-deployments
post-install:
@echo "${PORTTITLE} ${PORTVERSION} has been installed in ${ORION_DESTDIR}."
diff --git a/java/orion/files/orionctl b/java/orion/files/orionctl
index a8d258c30470..040da2d1bf47 100644
--- a/java/orion/files/orionctl
+++ b/java/orion/files/orionctl
@@ -4,23 +4,59 @@ if [ "${LOCALBASE}a" = "a" ]; then
LOCALBASE=/usr/local
fi
-JAVA_HOME=${LOCALBASE}/linux-jdk1.2.2
-ORION_HOME=${LOCALBASE}/orion
+NAME=orion
+ORION_HOME=${LOCALBASE}/orion1.4.5
LOG=${ORION_HOME}/log/orion.log
PID_FILE=/var/run/orion.pid
+JAR_FILE=${ORION_HOME}/orion.jar
+
+if [ "${JAVA_HOME}a" = "a" ]; then
+ JAVA_HOME=${LOCALBASE}/linux-jdk1.3.0
+fi
+JAVA_CMD=${JAVA_HOME}/bin/java
+
+# TODO: Check if we are being run at boot time right now
+
case "$1" in
start)
- if [ -r ${ORION_HOME}/orion.jar ]; then
- rm -rf ${PID_FILE}
- touch ${PID_FILE}
- chown root:wheel ${PID_FILE}
- chmod 600 ${PID_FILE}
- echo -n ' orion'
- ( cd ${ORION_HOME} && ${JAVA_HOME}/bin/java -jar orion.jar & echo $! > ${PID_FILE} ) > ${LOG} 2>&1
+ # Make sure the Orion directory does exist
+ if [ ! -d ${ORION_HOME} ]; then
+ echo ""
+ echo "${NAME}: ERROR: Unable to find Orion home directory at ${ORION_HOME}."
+ exit 64
fi
+
+ # Make sure the Orion JAR file exists
+ if [ ! -r ${JAR_FILE} ]; then
+ echo ""
+ echo "${NAME}: ERROR: Unable to find Orion JAR file at ${JAR_FILE}."
+ exit 64
+ fi
+
+ # Make sure the Java VM can be found
+ if [ ! -x ${JAVA_CMD} ]; then
+ echo ""
+ echo "${NAME}: ERROR: Unable to find Java VM at ${JAVA_HOME}."
+ exit 64
+ fi
+
+ # Create the process ID file
+ rm -rf ${PID_FILE}
+ touch ${PID_FILE}
+ chown root:wheel ${PID_FILE}
+ chmod 600 ${PID_FILE}
+
+ echo -n ' orion'
+ ( cd ${ORION_HOME} && ${JAVA_CMD} -jar orion.jar & echo $! > ${PID_FILE} ) > ${LOG} 2>&1
;;
stop)
+ if [ ! -e ${PID_FILE} ]; then
+ echo ""
+ echo "${NAME}: ERROR: Unable to find Orion PID file at ${PID_FILE}."
+ exit 64
+ fi
+
/bin/kill `cat ${PID_FILE}`
echo -n ' orion'
;;
diff --git a/java/orion/pkg-plist b/java/orion/pkg-plist
index 84dc264ce6e8..c173e6c1b49f 100644
--- a/java/orion/pkg-plist
+++ b/java/orion/pkg-plist
@@ -316,6 +316,7 @@ orion1.4.5/parser.jar
orion1.4.5/orionconsole.jar
orion1.4.5/orion.jar
orion1.4.5/mail.jar
+@dirrm orion1.4.5/application-deployments
@dirrm orion1.4.5/config/database-schemas
@dirrm orion1.4.5/config
@dirrm orion1.4.5/default-web-app/examples/cal