Skip to content
Browse files

added the start/stop scripts for OpenShift

  • Loading branch information...
1 parent d1f7a46 commit fc7c8e27bc19988e17e33823c02294f2234e77b1 @giastfader giastfader committed Feb 15, 2013
Showing with 15 additions and 0 deletions.
  1. +9 −0 start_openshift
  2. +6 −0 stop_openshift
View
9 start_openshift
@@ -0,0 +1,9 @@
+#!/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_INTERNAL_IP:8080
+# -Dorient.baasbox.path=$OPENSHIFT_REPO_DIR/../data/baasbox the path od the data file, you should not modify this since this path
+# -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
+
+nohup java -Dorient.baasbox.path=$OPENSHIFT_REPO_DIR/../data/baasbox -Dorient.baasbox.admin_password=admin -Dapplication.code=1234567890 -Dhttp.port=8080 -Dhttp.address=$OPENSHIFT_INTERNAL_IP $* -cp "$OPENSHIFT_REPO_DIR/bin/lib/*" play.core.server.NettyServer $OPENSHIFT_REPO_DIR/bin $OPENSHIFT_HOMEDIR/diy-0.1/logs/server.log 2>&1 &
View
6 stop_openshift
@@ -0,0 +1,6 @@
+#!/bin/bash
+# Put this file into the directory $OPENSHIFT_REPO_DIR/.openshift/action_hooks/
+# Rename it as "stop" and give to it the eXecution permission (chmod +x ./stop)
+
+kill `ps -ef | grep java | grep -v grep | awk '{ print $2 }'` > /dev/null 2>&1
+exit 0

0 comments on commit fc7c8e2

Please sign in to comment.
Something went wrong with that request. Please try again.