Mirto Silvio Busico wrote:
> I'm tryng to setup the automatic startup/shutdown script for Debian.
> 
> Attached there is the script I'm using (it starts jboss and an
> openoffice service - for pdf conversion)
> 
> There is anything bettter than this? (I mean someone created a better
> script that is recommended)
> 
> Is the script correct? (I know it seems to work but I don't know if it
> creates bad site effects - one missing thing is log rotation)

Thanks looks correct.  I'm not aware of anything like that in here for
the moment on our side.

Can I add it in svn in a third party contributions area somewhere ?

        J.

> Any help is greately appreciated.
> 
> Regards
>     Mirto
> 
> 
> 
> ------------------------------------------------------------------------
> 
> #! /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
> OODAEMON="xvfb-run -a /usr/lib/openoffice/program/soffice.bin -headless 
> ""-accept=socket,host=localhost,port=8100;urp;StarOffice.Service"""
> DAEMON1=/opt/jboss/bin/shutdown.sh
> DAEMON_ARGS=""
> PIDFILE=/var/run/$NAME.pid
> OOPIDFILE=/var/run/OO$NAME.pid
> SCRIPTNAME=/etc/init.d/$NAME
> LOGFILE=/var/log/nuxeo5
> 
> # Exit if the package is not installed
> [ -x "$NAME" ] || exit 0
> 
> # Read configuration variable file if it is present
> [ -r /etc/default/$NAME ] && . /etc/default/$NAME
> 
> # 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
>       $DAEMON >>$LOGFILE &
>       $OODAEMON >>$LOGFILE &
> }
> 
> #
> # Function that stops the daemon/service
> #
> do_stop()
> {
>       echo "Stopping Nuxeo5" >>$LOGFILE
>       $DAEMON1 >>$LOGFILE &
> }
> 
> 
> echo "sono qui 2" >&2
> 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


-- 
Julien Anguenot | Nuxeo R&D (Paris, France)
Open Source ECM - http://www.nuxeo.com
Nuxeo 5 : http://www.nuxeo.org
Mobile: +33 (0) 6 72 57 57 66

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to