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.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-rc
To unsubscribe, send any mail to "[email protected]"

Reply via email to