1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/b2bc0629e781/ changeset: b2bc0629e781 user: natefoo date: 2011-12-05 20:55:00 summary: Fedora(/RHEL/SL/CentOS) init script, thanks Brad Chapman! affected #: 2 files diff -r 94dc7288f81f61553467e283e2646755312d8a38 -r b2bc0629e78176b9cbe34c86a8eb141dfa0c70aa contrib/README --- a/contrib/README +++ b/contrib/README @@ -19,6 +19,12 @@ paths, and configure for start at boot with `update-rc.d galaxy defaults`. Also written and submitted by James Casbon. +galaxy.fedora-init: + + init script for Fedora/RedHat/Scientific Linux/CentOS. Copy to + /etc/init.d/galaxy, modify paths, and configure for start at boot with + `chkconfig galaxy on`. Written and submitted by Brad Chapman. + galaxy.solaris-smf.xml: SMF Manifest for Solaris 10 and OpenSolaris. Import with `svccfg import diff -r 94dc7288f81f61553467e283e2646755312d8a38 -r b2bc0629e78176b9cbe34c86a8eb141dfa0c70aa contrib/galaxy.fedora-init --- /dev/null +++ b/contrib/galaxy.fedora-init @@ -0,0 +1,105 @@ +#!/bin/bash +# +# Init file for Galaxy (http://galaxyproject.org/) +# Suitable for use on Fedora and derivatives (RedHat Enterprise Linux, Scientific Linux, CentOS) +# +# Contributed by Brad Chapman +# +# chkconfig: 2345 98 20 +# description: Galaxy http://galaxyproject.org/ + +#--- config + +SERVICE_NAME="galaxy" +RUN_AS="galaxy" +RUN_IN="/path/to/galaxy-dist" + +#--- main actions + +start() { + echo "Starting $SERVICE_NAME... " + cmd="cd $RUN_IN && sh run.sh --daemon" + case "$(id -un)" in + $RUN_AS) + eval "$cmd" + ;; + root) + su - $RUN_AS -c "$cmd" + ;; + *) + echo "*** ERROR *** must be $RUN_AS or root in order to control this service" >&2 + exit 1 + esac + echo "...done." +} + +stop() { + echo -n "Stopping $SERVICE_NAME... " + + cmd="cd $RUN_IN && sh run.sh --stop-daemon" + + case "$(id -un)" in + $RUN_AS) + eval "$cmd" + ;; + root) + su - $RUN_AS -c "$cmd" + ;; + *) + echo "*** ERROR *** must be $RUN_AS or root in order to control this service" >&2 + exit 1 + esac + + echo "done." +} + +status() { + echo -n "$SERVICE_NAME status: " + + while read pid; do + if [ "$(readlink -m /proc/$pid/cwd)" = "$(readlink -m $RUN_IN)" ]; then + echo "started" + return 0 + fi + done < <(ps ax -o 'pid cmd' | grep -P '^\s*\d+ python ./scripts/paster.py serve' | awk '{print $1}') + echo "stopped" + return 3 +} + +notsupported() { + echo "*** ERROR*** $SERVICE_NAME: operation [$1] not supported" +} + +usage() { + echo "Usage: $SERVICE_NAME start|stop|restart|status" +} + + +#--- + +case "$1" in + start) + start "$@" + ;; + stop) + stop + ;; + restart|reload) + stop + start + ;; + status) + set +e + status + exit $? + ;; + '') + usage >&2 + exit 1 + ;; + *) + notsupported "$1" >&2 + usage >&2 + exit 1 + ;; +esac Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.