DHIS-Live not working with Linux

There are two problems here:

  1. The syntax to define a function. Can we check http://tldp.org/LDP/abs/html/functions.html

  2. The character “-” is really trick when define functions with.

I changed to this:
#!/bin/bash

get ready to catch errors

trap ctrl_c INT
trap unexpected_exit ERR

ctrl_c () {
echo
echo “============================================”

echo "Keyboard interrupt"
echo "DHIS2 live exited"
echo "============================================"
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"

}

That works fine. Yes, it’s really strange that only these days this is reported!

Caveman

···

On Fri, Feb 1, 2013 at 3:14 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Hi Neeraj,

can you post the contents of the startup.sh script?

Lars

On Fri, Feb 1, 2013 at 11:26 AM, Neeraj Gupta neeraj.hisp@gmail.com wrote:

Hi Devs,

I was trying to work with DHIS Live on Ubuntu Server 11.10 , but I am unable to run it, when i am running startup.sh it is saying

trap: ERR: bad trap
/home/dhis-live/startup.sh: 7: Syntax error: “(” unexpected

Downloaded it from http://www.dhis2.org/downloads

Tried it on windows and it worked fine.
Does DHIS-Live work with Linux also or it works with windows only?


Thanks,
Neeraj Gupta


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Thanks,
Neeraj Gupta