Browse Source

Replace py setup with sh setup play2 scala anorm

Brittany Mazza 10 years ago
parent
commit
09f67f76bb

+ 0 - 6
frameworks/Scala/play2-scala/setup_scala_anorm.py

@@ -1,6 +0,0 @@
-
-# This file was generated by frameworks/Java/play2-java/generate_config.py.
-# Do not edit this file directly, use the script to regenerate.
-from .setup_common import make_setup_for_dir
-
-make_setup_for_dir(globals(), 'play2-scala-anorm')

+ 16 - 0
frameworks/Scala/play2-scala/setup_scala_anorm.sh

@@ -0,0 +1,16 @@
+#!/bin/bash
+
+cd play2-scala-anorm
+sed -i "s|jdbc:mysql:\/\/.*:3306|jdbc:mysql://${DBHOST}:3306|g" conf/application.conf
+
+# If application has an already existing process id, clear it.
+if [ -f ${TROOT}/play2-scala-anorm/target/universal/stage/RUNNING_PID ]
+then
+  rm -f -r ${TROOT}/play2-scala-anorm/target/universal/stage/RUNNING_PID
+fi
+
+# Stage application.
+${IROOT}/sbt/bin/sbt stage
+
+# Execute Start script in background.
+${TROOT}/play2-scala-anorm/target/universal/stage/bin/play2-scala-anorm &