aboutsummaryrefslogtreecommitdiff
path: root/textproc/cocoon/files
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/cocoon/files')
-rw-r--r--textproc/cocoon/files/cocoon.sh31
-rw-r--r--textproc/cocoon/files/cocoonctl48
-rw-r--r--textproc/cocoon/files/patch-cocoon.sh41
-rw-r--r--textproc/cocoon/files/pkg-deinstall61
-rw-r--r--textproc/cocoon/files/pkg-install55
5 files changed, 0 insertions, 236 deletions
diff --git a/textproc/cocoon/files/cocoon.sh b/textproc/cocoon/files/cocoon.sh
deleted file mode 100644
index 8ca8b5719622..000000000000
--- a/textproc/cocoon/files/cocoon.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /bin/sh
-#
-# $FreeBSD$
-#
-
-# PROVIDE: %%APP_NAME%%
-
-#
-# Add the following line to /etc/rc.conf to enable %%APP_NAME%%:
-#
-# %%APP_NAME%%_enable="YES"
-#
-
-. /etc/rc.subr
-
-name=%%APP_NAME%%
-rcvar=`set_rcvar`
-
-command=%%PREFIX%%/sbin/%%APP_NAME%%ctl
-command_args="$1"
-pidfile=%%PID_FILE%%
-procname=java
-
-# set defaults
-
-%%APP_NAME%%_enable=${%%APP_NAME%%_enable:-"NO"}
-%%APP_NAME%%_user=${%%APP_NAME%%_user:-"www"}
-%%APP_NAME%%_group=${%%APP_NAME%%_group:-"www"}
-
-load_rc_config ${name}
-run_rc_command "$1"
diff --git a/textproc/cocoon/files/cocoonctl b/textproc/cocoon/files/cocoonctl
deleted file mode 100644
index fa62902ead55..000000000000
--- a/textproc/cocoon/files/cocoonctl
+++ /dev/null
@@ -1,48 +0,0 @@
-#! %%PYTHON_CMD%%
-
-################################################################################
-# Author: Jean-Baptiste Quenot <jb.quenot@caraldi.com>
-# Purpose: Control cocoon process
-# Date Created: 2004-05-04 11:14:05
-# Revision: $FreeBSD$
-################################################################################
-
-import sys, os, signal, time
-
-LOGFILE = "%%LOGFILE%%"
-PREFIX = "%%PREFIX%%"
-APP_NAME = "%%APP_NAME%%"
-PID_FILE = "%%PID_FILE%%"
-
-if __name__ == '__main__':
- if sys.argv[1] == "start":
- # Append cocoon output to a log file
- l = open(LOGFILE, 'a')
- os.dup2(l.fileno(), sys.stdout.fileno())
- os.dup2(l.fileno(), sys.stderr.fileno())
-
- # Start cocoon in the background
- command = PREFIX + "/sbin/" + APP_NAME + ".sh"
- pid = os.spawnl(os.P_NOWAIT, command, command, "servlet")
-
- # Wait a little
- time.sleep(0.4)
-
- # Send a dummy signal to the process. If it died, an exception is
- # thrown
- os.kill(pid, signal.SIGCONT)
-
- # It's alive, so write down the process id
- f = open(PID_FILE, 'w')
- print >> f, pid
- f.close()
- elif sys.argv[1] == "stop":
- # Read the process id
- f = open(PID_FILE, 'r')
- pid = int(f.readline())
- f.close()
-
- # Terminate cocoon
- os.kill(pid, signal.SIGTERM)
- else:
- print "Usage: %s start|stop" % sys.argv[0]
diff --git a/textproc/cocoon/files/patch-cocoon.sh b/textproc/cocoon/files/patch-cocoon.sh
deleted file mode 100644
index 93a669d55bf3..000000000000
--- a/textproc/cocoon/files/patch-cocoon.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-$FreeBSD$
-
---- cocoon.sh.orig Thu Feb 12 09:48:55 2004
-+++ cocoon.sh Tue May 4 14:44:24 2004
-@@ -57,8 +57,7 @@
- # ----- Verify and Set Required Environment Variables -------------------------
-
- if [ "$JAVA_HOME" = "" ] ; then
-- echo You must set JAVA_HOME to point at your Java Development Kit installation
-- exit 1
-+ JAVA_HOME="%%JAVA_HOME%%"
- fi
-
- if [ "$JAVA_OPTIONS" = "" ] ; then
-@@ -66,7 +65,7 @@
- fi
-
- if [ "$COCOON_HOME" = "" ] ; then
-- COCOON_HOME='.'
-+ COCOON_HOME="%%APP_HOME%%"
- fi
-
- if [ "$COCOON_WEBAPP_HOME" = "" ] ; then
-@@ -76,7 +75,7 @@
- COCOON_WEBAPP_HOME=$STANDALONE_WEBAPP
- else
- # when in the build environment
-- COCOON_WEBAPP_HOME="$COCOON_HOME/build/webapp"
-+ COCOON_WEBAPP_HOME="$COCOON_HOME/webapp"
- fi
- fi
- echo "$0: using $COCOON_WEBAPP_HOME as the webapp directory"
-@@ -111,7 +110,7 @@
-
- # ----- Set Local Variables ( used to minimize cut/paste) ---------------------
-
--JAVA="$JAVA_HOME/bin/java"
-+JAVA="exec $JAVA_HOME/bin/java"
- ENDORSED_LIBS="$COCOON_HOME/lib/endorsed"
- ENDORSED="-Djava.endorsed.dirs=$ENDORSED_LIBS"
- PARSER=-Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser
diff --git a/textproc/cocoon/files/pkg-deinstall b/textproc/cocoon/files/pkg-deinstall
deleted file mode 100644
index 55134b973319..000000000000
--- a/textproc/cocoon/files/pkg-deinstall
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh
-#
-# This script does the following.
-#
-# * Checks if the PID file exists. If it does, it kills the
-# process and removes the PID file.
-#
-# * Checks if the 'www' user exists. If it does, then it displays
-# a message.
-#
-# $FreeBSD$
-#
-# Borrowed from the jakarta-tomcat port
-#
-
-set -e
-
-PID_FILE=%%PID_FILE%%
-RUNASUSER=%%RUNASUSER%%
-APP_NAME=%%APP_NAME%%
-LOGFILE=%%LOGFILE%%
-
-# Make sure we're in the right stage of the process
-if [ "$2" = "DEINSTALL" ]; then
-
- # Kill the process if it is still running
- if [ -s ${PID_FILE} ]; then
- PID=`cat ${PID_FILE}`
- echo -n ">> Killing ${APP_NAME} process (${PID})..."
-
- if /bin/kill ${PID} > /dev/null 2> /dev/null ; then
- echo " [ DONE ]"
- else
- echo " [ FAILED ]"
- fi
-
- echo -n ">> Removing PID file (${PID_FILE})..."
-
- if rm ${PID_FILE} > /dev/null 2> /dev/null ; then
- echo " [ DONE ]"
- else
- echo " [ FAILED ]"
- fi
- fi
-
- echo -n ">> Removing log file (${LOGFILE})..."
- if rm ${LOGFILE} > /dev/null 2> /dev/null ; then
- echo " [ DONE ]"
- else
- echo " [ FAILED ]"
- fi
-fi
-
-if [ "$2" = "POST-DEINSTALL" ]; then
- # If the user exists, then display a message
- if pw usershow "$RUNASUSER" 2>/dev/null 1>&2; then
- echo "To delete the $RUNASUSER user permanently, use 'pw userdel $RUNASUSER'"
- fi
-fi
-
-exit 0
diff --git a/textproc/cocoon/files/pkg-install b/textproc/cocoon/files/pkg-install
deleted file mode 100644
index 48ce6423e4fb..000000000000
--- a/textproc/cocoon/files/pkg-install
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-#
-# Checks if the requested user and group exist. If they don't, then
-# an attempt is made to create both.
-#
-# $FreeBSD$
-#
-# Borrowed from the jakarta-tomcat port
-#
-
-set -e
-
-RUNASUSER=%%RUNASUSER%%
-RUNASUID=%%RUNASUID%%
-GROUP=%%GROUP%%
-GID=%%GID%%
-APP_NAME=%%APP_NAME%%
-PID_FILE=%%PID_FILE%%
-LOGFILE=%%LOGFILE%%
-
-if [ "$2" = "POST-INSTALL" ]; then
- # We're called after the 'make install' process
- # 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 "${RUNASUSER}" 2>/dev/null 1>&2; then
-
- # If not, try to create it
- if pw useradd ${RUNASUSER} -u ${RUNASUID} -g ${GROUP} -h - \
- -s "/sbin/nologin" -d "/nonexistent" \
- -c "World Wide Web Owner"; \
- then
- echo "Added user \"${RUNASUSER}\"."
- else
- echo "Adding user \"${RUNASUSER}\" failed..."
- exit 1
- fi
- fi
-
- chown -R ${RUNASUSER}:${GROUP} $PKG_PREFIX/${APP_NAME}
- touch ${LOGFILE} ${PID_FILE}
- chown ${RUNASUSER}:${GROUP} ${LOGFILE} ${PID_FILE}
-fi
-
-exit 0