Date: Fri, 11 Jun 2010 15:23:08 -0700 From: Doug Barton <dougb@FreeBSD.org> To: "David E. Thiel" <lx@redundancy.redundancy.org> Cc: cvs-ports@FreeBSD.org, Kelly Hays <kelly.hays@jkhfamily.org>, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org Subject: Re: cvs commit: ports/net-im/prosody Makefile ports/net-im/prosody/files prosody.in Message-ID: <4C12B74C.1080508@FreeBSD.org> In-Reply-To: <20100611215306.GI2603@redundancy.redundancy.org> References: <201006111649.o5BGn8Wh043693@repoman.freebsd.org> <4C129CB0.8000103@FreeBSD.org> <20100611215306.GI2603@redundancy.redundancy.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 06/11/10 14:53, David E. Thiel wrote: > On Fri, Jun 11, 2010 at 01:29:36PM -0700, Doug Barton wrote: >> There is a problem with the change here in that the literal /usr/local >> should be replaced with %%PREFIX%%. However the whole script needs some >> work. > > Thanks Doug, I should have caught that. No worries. :) >> 4. Simplify the status and stop methods down to one function that takes >> an argument. > > This works mostly well, but I notice that the "restart" command > doesn't work, What output does it give? > and was going to add a restart_cmd telling it to issue a > prosodyctl stop followed by prosodyctl start. That's probably reasonable. > I kind of think it would > look cleaner to have start_cmd, stop_cmd and restart_cmd rather than > prosody_cmd and restart_cmd. Thoughts? The idea behind prosody_cmd is that it can handle all of the normal arguments in one method, rather than needing to duplicate essentially the same thing numerous times. That's what functions are for. :) The way start is handled currently is actually sort of clever, which is why I did not suggest changing it. However I _think_ the following will work, but it should be tested: start_cmd="prosody_cmd start" stop_cmd="prosody_cmd stop" restart_cmd="$start_cmd $stop_cmd" status_cmd="prosody_cmd status" This will also require removing command_args. I've updated the version at http://people.freebsd.org/~dougb/prosody.in.txt accordingly. If the restart_cmd above does not work, then the solution you suggested is fine. I should also point out that I don't particularly care if you and/or the maintainer decide to use the prosody_cmd idea or not. I have no authority to do anything other than suggest, although in this case _I_ happen to think it's a rather clever suggestion. :) Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C12B74C.1080508>