diff options
author | Ernst de Haan <znerd@FreeBSD.org> | 2002-03-04 23:19:12 +0000 |
---|---|---|
committer | Ernst de Haan <znerd@FreeBSD.org> | 2002-03-04 23:19:12 +0000 |
commit | 4b972fc88040b49d3680b574cb3f714739475d48 (patch) | |
tree | 071bab364eea96b5b9b91b371e647acfd10eaefc /www/orion | |
parent | 55acf188d006aa86373edec58d13bb9dbe3cb474 (diff) | |
download | ports-4b972fc88040b49d3680b574cb3f714739475d48.tar.gz ports-4b972fc88040b49d3680b574cb3f714739475d48.zip |
Notes
Diffstat (limited to 'www/orion')
-rw-r--r-- | www/orion/Makefile | 18 | ||||
-rw-r--r-- | www/orion/pkg-install | 46 | ||||
-rw-r--r-- | www/orion/pkg-plist | 13 |
3 files changed, 56 insertions, 21 deletions
diff --git a/www/orion/Makefile b/www/orion/Makefile index 0be9a410715b..6f37a99ec6e1 100644 --- a/www/orion/Makefile +++ b/www/orion/Makefile @@ -7,7 +7,7 @@ PORTNAME= orion PORTVERSION= 1.5.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= www java MASTER_SITES= http://www.orionserver.com/distributions/ \ http://www.atlassian.com/software/orion/downloads/ \ @@ -32,7 +32,7 @@ APP_TITLE= Orion Server APP_SHORTNAME= ${PORTNAME} APPCTL_NAME= ${APP_SHORTNAME}ctl CTL_SCRIPT= ${PREFIX}/bin/${APPCTL_NAME} -STARTUP_ORDER?= 020 +STARTUP_ORDER= 020 RC_SCRIPT= ${PREFIX}/etc/rc.d/${STARTUP_ORDER}.${PORTNAME}.sh JAVA_HOME?= ${LOCALBASE}/jdk1.3.1 JAVA_PORT?= ${PORTSDIR}/java/jdk13 @@ -41,10 +41,8 @@ WITH_JIKES?= YES .if ${WITH_JIKES} == "YES" RUN_DEPENDS+= ${JIKES_LOCATION}:${PORTSDIR}/java/jikes .endif -USER_NAME?= ${PORTNAME} -GROUP_NAME?= ${USER_NAME} -USER_ID?= 7104 -GROUP_ID?= ${USER_ID} +USER_NAME= www +GROUP_NAME= www PW?= /usr/sbin/pw HTTP_PORT?= 8090 RMI_PORT?= 23791 @@ -58,16 +56,14 @@ pre-install: @${ECHO} " Location of JDK: ${JAVA_HOME}" @${ECHO} " Location of Java port: ${JAVA_PORT}" @${ECHO} " Using Jikes: ${WITH_JIKES}" - @${ECHO} " Running as (user/group): ${USER_NAME}/${GROUP_NAME} (${USER_ID}:${GROUP_ID})" + @${ECHO} " Running as (user/group): ${USER_NAME}/${GROUP_NAME}" @${ECHO} " HTTP port: ${HTTP_PORT}" @${ECHO} " RMI port: ${RMI_PORT}" @${ECHO} " Starting after install: ${AUTO_START}" + PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL -do-install: - @# Add the group and the user if they do not exist - ${PW} groupadd -n ${GROUP_NAME} -g ${GROUP_ID} || true - ${PW} useradd -n ${USER_NAME} -u ${USER_ID} -g ${GROUP_NAME} -c "${APP_TITLE} account" -d ${APP_HOME} -s ${SH} -h - || true +do-install: @# Create the destination directory ${MKDIR} ${APP_HOME} diff --git a/www/orion/pkg-install b/www/orion/pkg-install new file mode 100644 index 000000000000..687ec3fc1f9e --- /dev/null +++ b/www/orion/pkg-install @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Checks if the 'www' user and group exist. If they don't, then +# an attempt is made to create both. +# +# $FreeBSD$ +# + +# Make sure we're called during the 'make install' process +if [ "$2" != "PRE-INSTALL" ]; then + exit 0 +fi + +# Set some constants +USER=www +GROUP=${USER} +UID=80 +GID=${UID} + +# See if the group already exists +if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then + + # If not, try to create it + if pw groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi +fi + +# See if the user already exists +if ! pw usershow "${USER}" 2>/dev/null 1>&2; then + + # If not, try to create it + if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + -s "/sbin/nologin" -d "/nonexistent" \ + -c "World Wide Web Owner"; \ + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi +fi +exit 0 diff --git a/www/orion/pkg-plist b/www/orion/pkg-plist index 0441fb417a96..328df7018e36 100644 --- a/www/orion/pkg-plist +++ b/www/orion/pkg-plist @@ -1,9 +1,5 @@ -etc/rc.d/orion.sh +etc/rc.d/020.orion.sh bin/orionctl -%%T%%/application-deployments/default/defaultWebApp/ -%%T%%/application-deployments/default/defaultWebApp/orion-web.xml -%%T%%/application-deployments/default/defaultWebApp/persistence -%%T%%/application-deployments/default/defaultWebApp/persistence/state.ser %%T%%/config/database-schemas/hypersonic.xml %%T%%/config/database-schemas/ms-access.xml %%T%%/config/database-schemas/ms-sql.xml @@ -322,9 +318,8 @@ bin/orionctl %%T%%/orion.jar %%T%%/tools.jar %%T%%/mail.jar -@dirrm %%T%%/application-deployments/default/defaultWebApp/persistence -@dirrm %%T%%/application-deployments/default/defaultWebApp -@dirrm %%T%%/application-deployments/default +%%T%%/crimson.jar +%%T%%/jaas.jar @dirrm %%T%%/application-deployments @dirrm %%T%%/config/database-schemas @dirrm %%T%%/config @@ -402,5 +397,3 @@ bin/orionctl @dirrm %%T%%/persistence/ejb @dirrm %%T%%/persistence @dirrm %%T%% -@unexec pw groupdel orion || true -@unexec pw userdel orion || true |