Yep - Sorry Senaka, I put the issues we found in a note asking the dev folks what was the right way to go - didn’t cc you - my bad :-(
I’l whack ‘em into a JIRA. cheers, John John Hawkins Director Solutions Architecture > On 24 Jun 2015, at 12:25, Senaka Fernando <sen...@wso2.com> wrote: > > Hi Aruna et al, > > I think its useful to do a code-review on our batch/shell scripts in general. > Over the years, we seem to have made a few mistakes here and there. While > chatting with John on this specific issue we noted a few others. > > Hi John, > > May be you should report all what you've noted on a JIRA issue (on the CARBON > jira project) and Kishanthan, Aruna and all can then schedule a review when > they've found some time for this. > > Thanks, > Senaka. > > On Wed, Jun 24, 2015 at 12:08 PM, John Hawkins <jo...@wso2.com > <mailto:jo...@wso2.com>> wrote: > Hi, > Senaka F and I were just discussing this yesterday and it looks like there > are some other problems with the .sh file . Seneka pointed out a few things > like... > > 1) the script is supposed to run under any scripting language (!/bin/sh) but > then reverts back to bash only at one point when running a command. Seems > like an inconsistency - what is the customer pre-req list - that they have to > have bash ? In which case why do we put !/bin/sh ? > > 2) There are quite a few places where the right syntax is used e.g. > “$CARBON_DUMP” but only a few others where it’s not. > > 3) Also: I just looked in Carbondump.sh and it seems to want only bash > environment (“!/usr/bash”).this ties in with [1] where we suggest one pre-req > in one file but another pre-req in another? > > So, it looks like we may have more than just this one inconsistency in the > various cmd files. Seneka suggested some kind of code review - does this make > sense to you as well ? Looks like the review may have to look at all the bat > & sh scripts we provide not just startserver.sh - just to make sure ? > > many thanks, > John. > > John Hawkins > Director Solutions Architecture > >> On 22 Jun 2015, at 19:51, Aruna Karunarathna <ar...@wso2.com >> <mailto:ar...@wso2.com>> wrote: >> >> On Mon, Jun 22, 2015 at 5:52 AM, John Hawkins <jo...@wso2.com >> <mailto:jo...@wso2.com>> wrote: >> Hi Rajith, >> Sure, I understand that is the workaround. But this a bug in the script - >> and if I found it then so will others? >> As I'm a newbie - What's the best way to raise this as a bug ? >> >> Hi John, >> >> You can raise a bug in the public Jira?. [1], explaining the steps to >> reproduce. >> >> [1]. https://wso2.org/jira/secure/Dashboard.jspa >> <https://wso2.org/jira/secure/Dashboard.jspa> >> >> >> On Monday, June 22, 2015, Rajith Roshan <raji...@wso2.com >> <mailto:raji...@wso2.com>> wrote: >> Hi John, >> Change the directory to the " bin" folder inside the "wso2am-1.8.0" >> directory in command line . >> Then enter "./wso2server.sh" to start the server >> and press "ctrl+c" to stop the server. >> >> Thanks. >> Rajith >> >> >> >> On Mon, Jun 22, 2015 at 5:21 PM, John Hawkins <jo...@wso2.com <>> wrote: >> HI Jason, >> >> this isn't the same problem as I'm seeing is it? >> My scenario is this... >> >> UNZIP e.g. APIM into directory with a <space> in the path e.g. /my spaced >> path/APIM >> >> wso2server.sh start - doesn't appear to work. Pid file is created but I >> can't see a running process >> wso2server.sh stop - fails because the cmd line produced needs quoting. >> Presumably this is why the above fails as well. >> >> cheers, >> John. >> >> >> On Monday, June 22, 2015, Jason De Silva <jas...@wso2.com <>> wrote: >> Hi John, >> >> I did try it with Application Server 5.2.1 and it seems to not work out the >> box. However I found out a jira issue raised for carbon [1]. And I did the >> relevant change [2] to the wso2server.sh file and ran the commands >> wso2server.sh start >> wso2server.sh stop >> >> After the change made, I observed that it works fine and you can start / >> stop the server. Hope this helps >> >> >> Regards >> Jason >> >> >> 1. https://wso2.org/jira/browse/CARBON-14477 >> <https://wso2.org/jira/browse/CARBON-14477> >> 2. https://wso2.org/jira/secure/attachment/32361/CARBON-14477.diff >> <https://wso2.org/jira/secure/attachment/32361/CARBON-14477.diff> >> >> On Mon, Jun 22, 2015 at 2:37 PM, John Hawkins <jo...@wso2.com <>> wrote: >> HI Folks, >> >> Possibly a newbie error but when I’ve unzipped wso2 server (API manager in >> this case if that makes a difference) into a directory with a space in it >> e.g. >> >> /wso2 servers/wso2am-1.8.0 >> >> then starting and stopping the server seems to fail using the syntax >> >> wso2server.sh start >> wso2server.sh stop >> >> I can see when I try the stop that it can’t find the pid file as it >> interprets the file tree wrongly however I don’t think the start is working >> anyhow so it wouldn’t find anything to stop :-) >> >> Any thoughts ? >> >> >> many thanks, >> John. >> >> John Hawkins >> Director Solutions Architecture >> >> >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org <> >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> <http://wso2.org/cgi-bin/mailman/listinfo/dev> >> >> >> >> >> -- >> Jason De Silva >> Software Engineer - QA >> Mobile: +94 (0) 772 097 678 <tel:%2B94%20%280%29%20772%20097%20678> >> Email: jas...@wso2.com <> >> WSO2 Inc. www.wso2.com <http://www.wso2.com/> >> >> >> -- >> John Hawkins >> Director: Solutions Architecture >> >> >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org <> >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> <http://wso2.org/cgi-bin/mailman/listinfo/dev> >> >> >> >> >> -- >> Rajith Roshan >> Software Engineer, WSO2 Inc. >> Mobile: +94-72-642-8350 <tel:%2B94-71-554-8430> >> >> >> -- >> John Hawkins >> Director: Solutions Architecture >> >> >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org <mailto:Dev@wso2.org> >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> <http://wso2.org/cgi-bin/mailman/listinfo/dev> >> >> >> >> >> -- >> >> Aruna Sujith Karunarathna | Software Engineer >> WSO2, Inc | lean. enterprise. middleware. >> #20, Palm Grove, Colombo 03, Sri Lanka >> Mobile: +94 71 9040362 <> | Work: +94 112145345 <> >> Email: ar...@wso2.com <mailto:ar...@wso2.com> | Web: www.wso2.com >> <http://www.wso2.com/> >> > > > _______________________________________________ > Dev mailing list > Dev@wso2.org <mailto:Dev@wso2.org> > http://wso2.org/cgi-bin/mailman/listinfo/dev > <http://wso2.org/cgi-bin/mailman/listinfo/dev> > > > > > -- > <http://wso2.com/> > > Senaka Fernando > Solutions Architect; WSO2 Inc.; http://wso2.com <http://wso2.com/> > Member; Apache Software Foundation; http://apache.org <http://apache.org/> > > E-mail: senaka AT wso2.com <http://wso2.com/> > P: +1 408 754 7388; ext: 51736; M: +44 782 741 1966 > Linked-In: http://linkedin.com/in/senakafernando > <http://linkedin.com/in/senakafernando> > > Lean . Enterprise . Middleware
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev