02-02-2007 06:34 AM
/etc/init.d/alfresco startbecause if it isn't the case, the stop action will fail. Is there any way to change alfresco startup to run it synchronously ?02-08-2007 10:33 PM
#!/bin/sh
#
# Startup script for Alfresco
#
# chkconfig: 345 96 14
# description: Tomcat Servlet Engine running Alfresco
# processname: tomcat
# pidfile: /opt/alfresco/alfresco.pid
#
# User under which tomcat will run
TOMCAT_USER=root
JAVA_HOME=/opt/java/jdk
RETVAL=0
# start, debug, stop, and status functions
start() {
# Start Tomcat in normal mode
SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep 8005|wc -l`
export JAVA_HOME=$JAVA_HOME
if [ $SHUTDOWN_PORT -ne 0 ]; then
echo "Alfresco already started"
else
echo "Starting alfresco…"
sudo -u $TOMCAT_USER /opt/alfresco/alf_start.sh
SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep 8005|wc -l`
while [ $SHUTDOWN_PORT -eq 0 ]; do
sleep 1
SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep 8005|wc -l`
done
RETVAL=$?
echo "Alfresco started"
[ $RETVAL=0 ] && touch /var/lock/subsys/alfresco
fi
}
stop() {
SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep 8005|wc -l`
export JAVA_HOME=$JAVA_HOME
if [ $SHUTDOWN_PORT -eq 0 ]; then
echo "Alfresco already stopped"
else
echo "Stopping alfresco…"
sudo -u $TOMCAT_USER /opt/alfresco/alf_stop.sh
SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep 8005|wc -l`
done
RETVAL=$?
echo "Alfresco stopped"
[ $RETVAL=0 ] && rm -f /var/lock/subsys/alfresco /opt/alfresco/alfresco.pid
fi
}
status() {
SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep 8005|wc -l`
if [ $SHUTDOWN_PORT -eq 0 ]; then
} echo "Alfresco stopped"
else
echo "Alfresco running"
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit $RETVAL11-27-2007 05:48 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.