11-17-2008 01:27 AM
#! /bin/sh -e
### BEGIN INIT INFO
# Provides: alfresco
# Required-Start: $syslog $time $network
# Required-Stop: $syslog $time $network
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: Alfresco doeument control system
# Description: Debian init script for the Alfresco document and content management system
### END INIT INFO
#
# Author: Jerry Fiddler
#
set -e
# Set the following.
# Location of the alfresco start/stop script
ALFRESCOSCRIPT=/usr/local/alfresco/alfresco.sh
# user ID under which to run alfresco. This is important because the "stop" version of this script will limit the processes to those with this UID, rather than stopping all java processes
ALFRESCOUSER=alfresco
# process name of the alfresco process
ALFRESCOPROCNAME=java
PATH=/bin:/usr/bin:/sbin:/usr/sbin
test -x $ALFRESCOSCRIPT || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting alfresco"
start-stop-daemon –start –oknodo –user $ALFRESCOUSER –name $ALFRESCOPROCNAME –startas $ALFRESCOSCRIPT –chuid $ALFRESCOUSER – start
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping deferred execution scheduler" "atd"
$ALFRESCOSCRIPT stop
# This next line shouldn't be necessary, but for some reason alfresco.sh doesn't kill the actual java process running alfresco.
# So, this does it explicitly
killall -u alfresco java
log_end_msg $?
;;
*)
echo "Usage: /etc/init.d/alfresco {start|stop}"
exit 1
;;
esac
exit 0
>sudo chown -R alfresco *
>sudo chgrp -R alfresco *
Also, for some reason one of the directories in the openoffice tree was read-only and owned by root, so that alfresco running as the alfresco user (and not root) couldn't start it. If you have this problem, go down the open office directory tree (/usr/lib/openoffice/program on my computer) and make sure everything can be read and executed by everyone.02-06-2009 03:10 PM
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.