dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11766
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3436: Minor fix
------------------------------------------------------------
revno: 3436
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-04-19 16:14:45 +0200
message:
Minor fix
added:
dhis-live/util/script/startup.sh
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== added file 'dhis-live/util/script/startup.sh'
--- dhis-live/util/script/startup.sh 1970-01-01 00:00:00 +0000
+++ dhis-live/util/script/startup.sh 2011-04-19 14:14:45 +0000
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# get ready to catch errors
+trap ctrl-c INT
+trap unexpected-exit ERR
+
+function ctrl-c () {
+ echo
+ echo "============================================"
+ echo "Keyboard interrupt"
+ echo "DHIS2 live exited"
+ echo "============================================"
+ exit
+}
+
+function unexpected-exit () {
+ echo "============================================"
+ echo "DHIS2 live exited with an error"
+ echo "Make sure you have a java runtime in your path"
+ echo "============================================"
+ read -p "Press any key to exit"
+}
+
+echo "Starting DHIS2 live ..."
+# java -jar dhis2-live.jar
+DHIS2LIVE=`dirname $0`
+#$JAVA_HOME/bin/
+java -jar $DHIS2LIVE/dhis2-live.jar
+echo "DHIS2 live exited normally"
+