Thanks, Mark, Chris. I will pull together all these bits, and if it ends up 
working, I will post it here and the wiki.

--Hardy

Sent from my iPad

On Mar 21, 2012, at 4:46 PM, "Mark Diggory" 
<mdigg...@atmire.com<mailto:mdigg...@atmire.com>> wrote:


Seems like the default script for running tomcat as a service should suffice 
just point to the Fedora tomcat instance instead.

On Mar 21, 2012 2:35 PM, "Chris Wilper" 
<<mailto:cwil...@duraspace.org>cwil...@duraspace.org<mailto:cwil...@duraspace.org>>
 wrote:
Hi Hardy,

I don't have one for RHEL, but below is a simple non-distro-specific
init.d script that you might find useful.

I recently used this script as a starting point for installing Fedora
as a service on ubuntu. The other critical step was defining
CATALINA_HOME and JAVA_OPTS in a new file,
/opt/fcrepo/tomcat/bin/setenv.sh   If you read the Tomcat scripts,
you'll notice that they source this setenv.sh script at Tomcat startup
time, if it's present.

- Chris

#!/bin/bash

# Fedora Repository startup script (using embedded Tomcat)

RUN_AS_USER=fcrepo
CATALINA_HOME=/opt/fcrepo/tomcat

start() {
       echo "Starting Fedora Repository: "
       if [ "x$USER" != "x$RUN_AS_USER" ]; then
         su - $RUN_AS_USER -c "$CATALINA_HOME/bin/startup.sh"
       else
         $CATALINA_HOME/bin/startup.sh
       fi
       echo "done."
}
stop() {
       echo "Shutting down Fedora Repository: "
       if [ "x$USER" != "x$RUN_AS_USER" ]; then
         su - $RUN_AS_USER -c "$CATALINA_HOME/bin/shutdown.sh"
       else
         $CATALINA_HOME/bin/shutdown.sh
       fi
       echo "done."
}

case "$1" in
 start)
       start
       ;;
 stop)
       stop
       ;;
 restart)
       stop
       sleep 10
       start
       ;;
 *)
       echo "Usage: $0 {start|stop|restart}"
esac

exit 0

On Wed, Mar 21, 2012 at 3:42 PM, Pottinger, Hardy J.
<<mailto:pottinge...@umsystem.edu>pottinge...@umsystem.edu<mailto:pottinge...@umsystem.edu>>
 wrote:
> Hi, I've been doing a bit of googling, and am working off the one example
> daemon launch script for RHEL I've found, which is here:
>
> <http://asingh.com.np/blog/fedora-commons-installation-and-configuration-gui> 
> http://asingh.com.np/blog/fedora-commons-installation-and-configuration-gui
> de/
>
> Though I'm a bit concerned that this example script has the embedded
> Tomcat server running as the root user. I'm also cribbing off the
> Islandora Ubuntu daemon launch script, and that version does use an
> unprivileged user, "fedora", for running the embedded Tomcat server. And,
> before I get all creative, I know some people are having luck using jsvc
> to run Tomcat as another user, so, anyway, I figure I better ask if anyone
> is already running Fedora Commons on RHEL, and if so, would you mind
> sharing your daemon launch script? Thanks!
>
> --
> HARDY POTTINGER 
> <<mailto:pottinge...@umsystem.edu>pottinge...@umsystem.edu<mailto:pottinge...@umsystem.edu>>
> University of Missouri Library Systems
> <http://lso.umsystem.edu/~pottingerhj/> http://lso.umsystem.edu/~pottingerhj/
> <https://MOspace.umsystem.edu/> https://MOspace.umsystem.edu/
> "A child who does not play is not a child,
> but the man who doesn't play has lost forever
> the child who lived in him and who he will
> miss terribly."
> --Pablo Neruda
>
>
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> <http://p.sf.net/sfu/sfd2d-msazure> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Fedora-commons-developers mailing list
> <mailto:Fedora-commons-developers@lists.sourceforge.net> 
> Fedora-commons-developers@lists.sourceforge.net<mailto:Fedora-commons-developers@lists.sourceforge.net>
> <https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers> 
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
<http://p.sf.net/sfu/sfd2d-msazure>http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Fedora-commons-developers mailing list
<mailto:Fedora-commons-developers@lists.sourceforge.net>Fedora-commons-developers@lists.sourceforge.net<mailto:Fedora-commons-developers@lists.sourceforge.net>
<https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers>https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Fedora-commons-developers mailing list
Fedora-commons-developers@lists.sourceforge.net<mailto:Fedora-commons-developers@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Fedora-commons-developers mailing list
Fedora-commons-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers

Reply via email to