dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #04800
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1598: updated startup.sh. Added out-of-date warning on readme
------------------------------------------------------------
revno: 1598
committer: Bob Jolliffe <bobj@bobj-laptop>
branch nick: trunk
timestamp: Tue 2010-03-09 14:43:41 +0000
message:
updated startup.sh. Added out-of-date warning on readme
modified:
dhis-live/readme.txt
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.
=== modified file 'dhis-live/readme.txt'
--- dhis-live/readme.txt 2010-01-08 22:42:23 +0000
+++ dhis-live/readme.txt 2010-03-09 14:43:41 +0000
@@ -1,3 +1,5 @@
+Warning: this readme has been superceded by work on the new automated installer
+
This is a first attempt at building a lite version of dhis. It
creates an executable jar which contains jetty server classes and a
simple tray icon controller.
=== modified file 'dhis-live/util/script/startup.sh'
--- dhis-live/util/script/startup.sh 2009-09-11 19:14:49 +0000
+++ dhis-live/util/script/startup.sh 2010-03-09 14:43:41 +0000
@@ -1,4 +1,28 @@
-#!/bin/sh
-
-echo "Starting DHIS 2..."
-java -jar dhis2-lite.jar
+#!/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
+$JAVA_HOME/bin/java -jar dhis2-live.jar
+echo "DHIS2 live exited normally"
+