forked from playframework/playframework
-
Notifications
You must be signed in to change notification settings - Fork 1
/
play
executable file
·47 lines (41 loc) · 1.16 KB
/
play
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#! /usr/bin/env sh
if [ -f conf/application.conf ]; then
if test "$1" = "clean-all"; then
`dirname $0`/framework/cleanIvyCache
`dirname $0`/framework/build clean
if [ $# -ne 1 ]
then
shift
else
echo "[info] Done!"
exit 0
fi
fi
if test "$1" = "stop"; then
if [ -f RUNNING_PID ]; then
echo "[info] Stopping application (with PID `cat RUNNING_PID`)..."
kill `cat RUNNING_PID`
RESULT=$?
if test "$RESULT" = 0; then
echo "[info] Done!"
exit 0
else
echo "[\033[31merror\033[0m] Failed ($RESULT)"
exit $RESULT
fi
else
echo "[\033[31merror\033[0m] No RUNNING_PID file. Is this application running?"
exit 1
fi
fi
if [ -z "${JPDA_PORT}" ]; then
JPDA_PORT="9999"
fi
if [ -n "$1" ]; then
JPDA_PORT="${JPDA_PORT}" `dirname $0`/framework/build "$@"
else
JPDA_PORT="${JPDA_PORT}" `dirname $0`/framework/build play
fi
else
java -Dsbt.ivy.home=`dirname $0`/repository -Dplay.home=`dirname $0`/framework -Dsbt.boot.properties=`dirname $0`/framework/sbt/play.boot.properties -jar `dirname $0`/framework/sbt/sbt-launch.jar "$@"
fi