Date: Thu, 01 Dec 2011 23:31:29 +0400 From: Ruslan Mahmatkhanov <cvs-src@yandex.ru> To: Doug Barton <dougb@FreeBSD.org> Cc: freebsd-rc@freebsd.org Subject: Re: rc-script review request Message-ID: <4ED7D611.50604@yandex.ru> In-Reply-To: <4ED6BE87.4060408@FreeBSD.org> References: <4ED66DCB.1040102@yandex.ru> <CADLo83-RR945MKbdvpdghHsHpO1_MA4OA21WkA_3xCTjOOhDsQ@mail.gmail.com> <4ED67B8F.50109@yandex.ru> <4ED6BE87.4060408@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Doug Barton wrote on 01.12.2011 03:38:
>
> I think that what you need is to provide at least one default, so after
> the default for _enable you'd have something like this:
>
> : ${zope213_instances:=%%PREFIX%%}
> (assuming that /usr/local is the default
>
> Then you need an additional function:
>
> zope213_check_instances () {
> cmd="$1"
> shift
>
> if [ -n "$@" ]; then
> zope213_instances="$@"
> elif [ -z "$zope213_instances" ]; then
> err 1 "No value for zope213_instances, so nothing to do"
> fi
> }
>
> And call that function first in each of your start/stop/restart functions.
>
> You should test that of course. :)
>
>
> hth,
>
> Doug
>
Ok, i merged all the changes by you including zope213_check_instances()
and default instance directory. I had tested it both with default
instance and with multiple instances - all is working just fine, thank
you much!
The only thing that is looking bad is:
- f.e i have two instances in /usr/local/www/Zope213 - MyFirstInstance
and MySecondInstance (they use different tcp ports)
- i have in my rc.conf:
zope213_enable="YES"
#zope213_instances="/usr/local/www/Zope213/MyFirstInstance
/usr/local/www/Zope213/MySecondInstance"
^^^^^^^^^^^^^^^^^^^^^^ it's a single line actually
- i trying to start zope:
service zope213 start
- i'm getting:
Starting Zope 2.13: Zope instance /usr/local/www/Zope213/ -> eval:
/usr/local/www/Zope213//bin/zopectl: not found
.
As far i understand there should be something like "exit 1" somewhere,
but i don't understand where exactly. Would you please help?
There is also some problem with $*/$@ stuff. I was able to make it work
only by combining them. You can see the updated script here:
https://github.com/mexicarne/zope/blob/master/www/zope213/files/zope213.in
Thanks.
--
Regards,
Ruslan
Tinderboxing kills... the drives.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ED7D611.50604>
