Files
xen-orchestra/xo-server
2013-12-27 11:51:32 +01:00

47 lines
1.3 KiB
Plaintext
Executable File

#/bin/sh -eu
# This file is a part of Xen Orchestra Server.
#
# Xen Orchestra Server is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# Xen Orchestra Server is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Xen Orchestra Server. If not, see
# <http://www.gnu.org/licenses/>.
#
# @author Julien Fontanet <julien.fontanet@vates.fr>
# @license http://www.gnu.org/licenses/gpl-3.0-standalone.html GPLv3
#
# @package Xen Orchestra Server
MAIN='src/main.coffee'
COFFEE='./node_modules/.bin/coffee'
#######################################
cd -P "$(dirname "$(which "$0")")"
########################################
if [ "${1:-}" = '--debug' ]
then
shift
# Launch XO-Server in debug mode.
"$COFFEE" --nodejs --debug-brk "$MAIN" "$@" > /dev/null &
# Runs Node Inspector (avoids the recommended alternate HTTP port
# for XO-Server).
exec ./node_modules/.bin/node-inspector --web-port 64985
else
exec "$COFFEE" "$MAIN" "$@"
fi