#!/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
#################################
# application: test
# DFILE : pid file
# GDIR : application webapp
# LOGDIR : logs dir
######################
NAME=et-play
TestDIR="/data/webapps/play/test"
GDIR="${TestDIR}/test"
PIDFILE="${TestDIR}/${NAME}.pid"
LOGDIR="${GDIR}/logs"
APP_USER=test
# Timeout in seconds for the shutdown of webapps
APP_SHUTDOWN=30
case "$1" in
start)
echo $pwd
su - ${APP_USER} -c "play start $GDIR >> $LOGDIR/log.log 2>&1 &"
echo "$NAME. start finish"
;;
stop)
echo -n "Stopping $DESC: "
su - ${APP_USER} -c " play stop $GDIR >> $LOGDIR/log.log 2>&1 & "
;;
restart)
$0 stop $*
sleep 1
$0 start $*
;;
*)
echo "Usage: ${ETDIR}/bin/${NAME}.sh {start|stop|restart}" >&2
exit 1
;;
esac
exit 0
posted on 2010-03-19 13:22
冰是没有未来的,因为它的永恒 阅读(213)
评论(0) 编辑 收藏 所属分类:
playframework