dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20820
Re: DHIS-Live not working with Linux
I would suggest to make the first line to call sh:
#!/bin/sh
This I believe is more portable compared to expecting bash. Not that bash
isn't available, but still chances are that might be unavailable in other
systems
---
Regards,
Saptarshi PURKAYASTHA
My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE
On 1 February 2013 11:11, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:
> Hi Neeraj
>
> This strange error seems to indicate you don't have a bash shell which
> is odd, or if you do its not being used.
>
> I see the error when I type 'sh startup.sh'.
>
> But when I explicitly type 'bash startup.sh' all is fine. Or even
> just './startup.sh'
>
> Can you confirm how you are starting this script? Maybe you have a
> shortcut which explicitly calls 'sh'.
>
> Also I would not suggest that dhis-live is the best option for running
> on ubuntu server if this is meant to be for production use. It uses a
> pre-canned set of JAVA_OPTS which you would more likely want to tune
> to your environment.
>
> Bob
>
>
>
> On 1 February 2013 10:01, Neeraj Gupta <neeraj.hisp@xxxxxxxxx> wrote:
> > Lars,
> >
> > Below is the content of startup.sh
> >
> > #!/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"
> >
> >
> >
> > On Fri, Feb 1, 2013 at 3:14 PM, Lars Helge Øverland <larshelge@xxxxxxxxx
> >
> > 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@xxxxxxxxx>
> >> 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@xxxxxxxxxxxxxxxxxxx
> >>> Unsubscribe : https://launchpad.net/~dhis2-devs
> >>> More help : https://help.launchpad.net/ListHelp
> >>>
> >>
> >
> >
> >
> > --
> > Thanks,
> > Neeraj Gupta
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~dhis2-devs
> > Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~dhis2-devs
> > More help : https://help.launchpad.net/ListHelp
> >
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help : https://help.launchpad.net/ListHelp
>
References