details: http://www.bx.psu.edu/hg/galaxy/rev/da1a03642283 changeset: 2935:da1a03642283 user: Nate Coraor <nate@bx.psu.edu> date: Fri Oct 30 12:41:17 2009 -0400 description: Add contributed Debian init script and OS X LaunchDaemon plist from James Casbon, and my Solaris SMF manifest. diffstat: contrib/README | 19 ++++++ contrib/edu.psu.galaxy.GalaxyServer.plist | 22 +++++++ contrib/galaxy.debian-init | 55 ++++++++++++++++++ contrib/galaxy.solaris-smf.xml | 75 +++++++++++++++++++++++++ 4 files changed, 171 insertions(+), 0 deletions(-) diffs (187 lines): diff -r 979534de254d -r da1a03642283 contrib/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contrib/README Fri Oct 30 12:41:17 2009 -0400 @@ -0,0 +1,19 @@ +CONTENTS +-------- + +edu.psu.galaxy.GalaxyServer.plist: + + LaunchDaemon definition for OS X (pre-Snow Leopard?). Modify paths and + load with `launchctl load edu.psu.galaxy.GalaxyServer.plist`. Written and + submitted by James Casbon. + +galaxy.debian-init: + + init script for Debian/Ubuntu Linux. Copy to /etc/init.d/galaxy, modify + paths, and configure for start at boot with `update-rc.d galaxy defaults`. + Also written and submitted by James Casbon. + +galaxy.solaris-smf.xml: + + SMF Manifest for Solaris 10 and OpenSolaris. Import with `svccfg import + galaxy.solaris-smf.xml`. diff -r 979534de254d -r da1a03642283 contrib/edu.psu.galaxy.GalaxyServer.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contrib/edu.psu.galaxy.GalaxyServer.plist Fri Oct 30 12:41:17 2009 -0400 @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>Label</key> + <string>edu.psu.galaxy.GalaxyServer</string> + <key>OnDemand</key> + <false/> + <key>Program</key> + <string>galaxy_dist/run.sh<string> + <key>RunAtLoad</key> + <true/> + <key>ServiceDescription</key> + <string>Galaxy</string> + <key>StandardErrorPath</key> + <string>galaxy_dist/log/galaxy.stderr</string> + <key>StandardOutPath</key> + <string>galaxy_dist/log/galaxy.stdout</string> + <key>UserName</key> + <string>galaxy</string> +</dict> +</plist> diff -r 979534de254d -r da1a03642283 contrib/galaxy.debian-init --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contrib/galaxy.debian-init Fri Oct 30 12:41:17 2009 -0400 @@ -0,0 +1,55 @@ +#!/bin/bash + +# Author: James Casbon, 2009 + +### BEGIN INIT INFO +# Provides: galaxy +# Required-Start: $network $local_fs $mysql +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Galaxy +### END INIT INFO + +. /lib/lsb/init-functions + +USER="galaxy" +GROUP="nogroup" +DIR="/home/galaxy/galaxy_dist/" +PYTHON="/usr/bin/python" +OPTS="-ES ./scripts/paster.py serve --log-file /home/galaxy/galaxy.log universe_wsgi.ini" +PIDFILE="/var/run/galaxy.pid" + +case "${1:-''}" in + 'start') + log_daemon_msg "Starting Galaxy" + if start-stop-daemon --chuid $USER --group $GROUP --start --make-pidfile \ + --pidfile $PIDFILE --background --chdir $DIR --exec $PYTHON -- $OPTS; then + log_end_msg 0 + else + log_end_msg 1 + fi + + ;; + 'stop') + log_daemon_msg "Stopping Galaxy" + if start-stop-daemon --stop --pidfile $PIDFILE; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + 'restart') + # restart commands here + $0 stop + $0 start + + ;; + *) # no parameter specified + echo "Usage: $SELF start|stop|restart|reload|force-reload|status" + exit 1 + ;; +esac + + + diff -r 979534de254d -r da1a03642283 contrib/galaxy.solaris-smf.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contrib/galaxy.solaris-smf.xml Fri Oct 30 12:41:17 2009 -0400 @@ -0,0 +1,75 @@ +<?xml version="1.0"?> +<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> + +<service_bundle type='manifest' name='nginx'> + +<service name='application/galaxy' type='service' version='0'> + + <dependency name='net' + grouping='require_all' + restart_on='none' + type='service'> + <service_fmri + value='svc:/network/loopback'/> + </dependency> + + <dependency name='filesystem-local' + grouping='require_all' + restart_on='none' + type='service'> + <service_fmri + value='svc:/system/filesystem/local:default'/> + </dependency> + + <instance name='main' enabled='false'> + + <exec_method name='start' + type='method' + exec='python -ES ./scripts/paster.py serve universe_wsgi.webapp.ini --log-file=log/main.log --daemon' + timeout_seconds='60'> + <method_context + working_directory='/galaxy'> + <method_credential user='galaxy' group='galaxy' /> + <method_environment> + <envvar name="PATH" value="/opt/local/bin:/bin:/usr/bin" /> + <envvar name="TEMP" value="/galaxy/database/tmp" /> + </method_environment> + </method_context> + + </exec_method> + + <exec_method name='stop' + type='method' + exec=':kill' + timeout_seconds='60'> + <method_context> + <method_credential user='galaxy' group='galaxy' /> + </method_context> + </exec_method> + + <property_group name='general' type='framework'> + <propval name='action_authorization' type='astring' + value='solaris.smf.manage.galaxy' /> + <propval name='value_authorization' type='astring' + value='solaris.smf.manage.galaxy' /> + </property_group> + + </instance> + + <stability value='Evolving' /> + + <template> + <common_name> + <loctext xml:lang='C'> + Galaxy + </loctext> + </common_name> + <documentation> + <doc_link name='galaxyproject.org' + uri='http://galaxyproject.org' /> + </documentation> + </template> + +</service> + +</service_bundle>