08-17-2010 03:42 AM
#!/bin/bash
# This is the init script for starting up the
# Jakarta Alfresco Deployer server
#
# chkconfig: 345 91 10
# description: Starts and stops the Alfresco Deployer daemon.
#
# Source function library.
. /etc/rc.d/init.d/functions
# Get config.
. /etc/sysconfig/network
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
alfhome=/usr/share/alfresco-3.3g
startup=$alfhome/Deployment/deploy_start.sh
shutdown=$alfhome/Deployment/deploy_stop.sh
export JAVA_HOME=/usr/java/jdk1.6.0_11
start(){
echo -n $"Starting Alfresco Deployer service: "
#daemon -c
runuser -s /bin/bash - root -c $startup
RETVAL=$?
echo
}
stop(){
action $"Stopping Alfresco Deployer service: "
runuser -s /bin/bash - root -c $shutdown
RETVAL=$?
echo
}
restart(){
stop
start
}
status(){
numproc=`ps -ef | grep alfresco.deployment | grep -v "grep alfresco.deployment" | wc -l`
if [ $numproc -gt 0 ]; then
echo "Alfresco Deployer is running…"
else
echo "Alfresco Deployer is stopped…"
fi
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
# This doesn't work 😉
status
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart}"
exit 1
esac
exit 0
#!/bin/sh
# Make sure prerequisite environment variables are set
if [ -z "$JAVA_HOME" ]; then
JAVA_PATH=`which java 2>/dev/null`
if [ "x$JAVA_PATH" != "x" ]; then
JAVA_LOCATION=`dirname $JAVA_PATH 2>/dev/null`
JAVA_HOME=`dirname $JAVA_LOCATION 2>/dev/null`
fi
fi
if [ -z "$JAVA_HOME" ]; then
echo "The JAVA_HOME environment variable is not defined"
exit 1
fi
#
# Set the JAVA_EXT_DIR to point to the java extensions folder.
# this will be needed to pick up the cryptography libraries
#
if [ -e "$JAVA_HOME/lib/ext" ]
then
JAVA_EXT_DIR=$JAVA_HOME/lib/ext
fi
if [ -e "$JAVA_HOME/jre/lib/ext" ]
then
JAVA_EXT_DIR=$JAVA_HOME/jre/lib/ext
fi
if [ -z "$JAVA_EXT_DIR" ];
then
JAVA_EXT_DIR=/usr/lib/jvm/jre/lib/ext
fi
# Set RMI_LISTEN_HOSTNAME to the hostname you wish the deployment server to listen on.
# See http://www.springframework.org/docs/api/org/springframework/remoting/rmi/RmiServiceExporter.html
# for more details.
RMI_LISTEN_HOSTNAME=""
echo .
echo ====================================
echo = Start Alfresco Deployment Server =
echo ====================================
echo .
if [ -z "$RMI_LISTEN_HOSTNAME" ] ; then
nohup $JAVA_HOME/bin/java -server -classpath . -Djava.ext.dirs=.:$JAVA_EXT_DIR org.alfresco.deployment.Main application-context.xml &
else
nohup $JAVA_HOME/bin/java -server -classpath . -Djava.ext.dirs=.:$JAVA_EXT_DIR -Djava.rmi.server.hostname=$RMI_LISTEN_HOSTNAME org.alfresco.deployment.Main application-context.xml &
fi
08-17-2010 04:24 AM
08-17-2010 04:31 AM
08-17-2010 05:03 AM
# Set RMI_LISTEN_HOSTNAME to the hostname you wish the deployment server to listen on.
# See http://www.springframework.org/docs/api/org/springframework/remoting/rmi/RmiServiceExporter.html
# for more details.
RMI_LISTEN_HOSTNAME=""
echo .
echo ====================================
echo = Start Alfresco Deployment Server =
echo ====================================
echo .
if [ -z "$RMI_LISTEN_HOSTNAME" ] ; then
nohup $JAVA_HOME/bin/java -server -classpath . -Djava.ext.dirs=.:$JAVA_EXT_DIR org.alfresco.deployment.Main application-context.xml &
else
nohup $JAVA_HOME/bin/java -server -classpath . -Djava.ext.dirs=.:$JAVA_EXT_DIR -Djava.rmi.server.hostname=$RMI_LISTEN_HOSTNAME org.alfresco.deployment.Main application-context.xml &
fi
08-18-2010 12:38 AM
08-18-2010 01:27 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.