Hi all,
thanks to Laurent and Tiry I was able to create the startup script for
Debian Etch
Attached there is the script to copy in /etc/init.d
Then you have to give the command "update-rc.d nuxeo5 defaults" from
this point the jboss instance containing nuxeo5 and the openoffice
daemon are started and stopped with the system.
To do: stop the openoffice daemon
Regards
Mirto
--
__________________________________________________________
Mirto Silvio Busico ICT Consultant
Tel. +39 333 4562651
#! /bin/sh
### BEGIN INIT INFO
# Provides: Nuxeo5
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Nuxeo CMS
# Description: Java Content Management system
### END INIT INFO
# Author: Foo Bar <[EMAIL PROTECTED]>
#
# Please remove the "Author" lines above and replace them
# with your own name if you copy and modify this script.
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Java CMS "
NAME=nuxeo5
DAEMON=/opt/jboss/bin/run.sh
# to start the OO daemon you have first to install the nx extension
# instructions at
..../org.nuxeo.ecm.platform.transform.plugins/ooo_autoListen/README
# the command on Debian is "/usr/lib/openoffice/program/unopkg add --shared
nxOOoAutoListen.oxt"
# the command have to be launched from the
..../org.nuxeo.ecm.platform.transform.plugins/ooo_autoListen/ directory
OODAEMON="xvfb-run -a /usr/lib/openoffice/program/soffice.bin -headless"
JMXUSER=admin
JMXPSW=admin
DAEMON1="/opt/jboss/bin/shutdown.sh -u $JMXUSER -p $JMXPSW -S"
DAEMON_ARGS=""
#PIDFILE=/var/run/$NAME.pid
#OOPIDFILE=/var/run/OO$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
LOGFILE=/var/log/nuxeo5
INSTANCEHOME=/opt/jboss
DIRNAME=`dirname $0`
PROGNAME=`basename $0`
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
echo "Staring Nuxeo5" >$LOGFILE
cd $INSTANCEHOME/bin
$DAEMON >>$LOGFILE &
$OODAEMON >>$LOGFILE &
}
#
# Function that stops the daemon/service
#
do_stop()
{
echo "Stopping Nuxeo5" >>$LOGFILE
cd $INSTANCEHOME/bin
echo $DAEMON1 -S>>$LOGFILE >&2
echo "DIRNAME" $DIRNAME >&2
echo "PROGNAME" $PROGNAME >&2
$DAEMON1 -S>>$LOGFILE &
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop}" >&2
exit 3
;;
esac
:
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm