https://github.com/galaxyproject/galaxy
Tip revision: 0642b5940fa66bf875297e2afd1588527caed318 authored by Marius van den Beek on 23 September 2024, 12:09:19 UTC
Merge pull request #18871 from mvdbeek/fix_integration_tests_wrong_dataset_state
Merge pull request #18871 from mvdbeek/fix_integration_tests_wrong_dataset_state
Tip revision: 0642b59
galaxy_reports.fedora-init
#!/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/
#--- loading functions
. /etc/init.d/functions
#--- config
SERVICE_NAME="galaxy-reports"
RUN_AS="galaxy"
RUN_IN="/path/to/galaxy-dist"
#--- main actions
start() {
echo "Starting $SERVICE_NAME... "
cmd="cd $RUN_IN && sh run_reports.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_reports.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."
}
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
echo -n "$SERVICE_NAME status: "
status -p $RUN_IN/reports_webapp.pid $SERVICE_NAME
exit $?
;;
'')
usage >&2
exit 1
;;
*)
notsupported "$1" >&2
usage >&2
exit 1
;;
esac