https://github.com/galaxyproject/galaxy
Tip revision: e0a06a36e22deb1a391bc3afd45c993f29052731 authored by Nicola Soranzo on 12 December 2019, 17:48:38 UTC
Merge branch 'release_17.01' into release_17.05
Merge branch 'release_17.01' into release_17.05
Tip revision: e0a06a3
galaxy.debian-init
#!/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"
GALAXY_DIR="/home/galaxy/galaxy_dist/"
# Galaxy releases >= 16.01 installs dependencies by default into a virtualenv in <GALAXY_DIR>/.venv
# A simple way to activate this virtualenv is to use the python interpreter in <GALAXY_DIR>/.venv
# See https://wiki.galaxyproject.org/News/2016_01_GalaxyRelease and
# https://github.com/galaxyproject/galaxy/blob/dev/doc/source/admin/framework_dependencies.rst
PYTHON="/home/galaxy/galaxy_dist/.venv/bin/python"
OPTS="./scripts/paster.py serve --log-file /home/galaxy/galaxy.log config/galaxy.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 $GALAXY_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