forked from baasbox/baasbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart_openshift
12 lines (11 loc) · 1.03 KB
/
start_openshift
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
# Put this file into the directory $OPENSHIFT_REPO_DIR/.openshift/action_hooks/
# Rename it as "start" and give to it the eXecution permission (chmod +x ./start)
# The application will work only if it binds to $OPENSHIFT_DIY_IP:8080
# -Dorient.baasbox.path=$OPENSHIFT_DATA_DIR/baasbox the path of the data file, you should not modify this since this path is a persistent filesystem
# -Dorient.baasbox.admin_password=admin the admin user password, modify it before launching BaasBox so to modify the admin pass at db creation time
# -Dapplication.code=1234567890 you MUST modify this to any valid string. This will be your application code
BASEDIR=$(dirname $0)
$BASEDIR/stop
rm $OPENSHIFT_REPO_DIR/bin/RUNNING_PID
nohup java -Dorient.baasbox.path=$OPENSHIFT_DATA_DIR/baasbox -Dorient.baasbox.admin_password=admin -Dapplication.code=1234567890 -Dhttp.port=$OPENSHIFT_DIY_PORT -Dhttp.address=$OPENSHIFT_DIY_IP $* -cp "$OPENSHIFT_REPO_DIR/bin/lib/*" play.core.server.NettyServer $OPENSHIFT_REPO_DIR/bin $OPENSHIFT_DIY_LOG_DIR/baasbox.log &