dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20844
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9700: Changed live script to use /bin/sh instead of /bin/bash
------------------------------------------------------------
revno: 9700
committer: Bob Jolliffe <bobjolliffe@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2013-02-03 11:55:33 +0000
message:
Changed live script to use /bin/sh instead of /bin/bash
modified:
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/util/script/startup.sh'
--- dhis-live/util/script/startup.sh 2011-04-19 14:14:45 +0000
+++ dhis-live/util/script/startup.sh 2013-02-03 11:55:33 +0000
@@ -1,10 +1,9 @@
-#!/bin/bash
+#!/bin/sh
# get ready to catch errors
-trap ctrl-c INT
-trap unexpected-exit ERR
+trap ctrl_c INT
-function ctrl-c () {
+ctrl_c () {
echo
echo "============================================"
echo "Keyboard interrupt"
@@ -13,18 +12,18 @@
exit
}
-function unexpected-exit () {
+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"
+ read -p "Press enter to exit" ch
+ exit
}
echo "Starting DHIS2 live ..."
-# java -jar dhis2-live.jar
+
DHIS2LIVE=`dirname $0`
-#$JAVA_HOME/bin/
-java -jar $DHIS2LIVE/dhis2-live.jar
+java -jar $DHIS2LIVE/dhis2-live.jar || unexpected_exit
echo "DHIS2 live exited normally"