[Zope] init.d script and out of place instances

2005-11-24 Thread Fernando Martins
Thanks for all the replies! I got quite a good picture of the situation.

Final solution was to symlink zopectl into init.d and run update-rc.d.

In the meanwhile, I've also come across two relevant links which might be
useful for someone else:

similar problem:
http://plone.org/documentation/how-to/helpcenterhowto.2005-10-24.6883487858/
talkback/1130736742/discussionitem_view

Debian zope/plone package web page:
http://pkg-zope.alioth.debian.org/

Regards,
Fernando

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] init.d script and out of place instances

2005-11-24 Thread Christophe Gravier

Hi Fernando,

In my debian distro, in order to have an init.d script, I added a new 
file in /etc/init.d, let's name it zope.sh.


Whitin, code a daemon, like:
(beware i made it from my zope's insatnces over several machines and zeo 
init script, so I haven't tested it (may contains typo).  Moreover this 
may not be fully linux standard compliant (I don't know in fact)).


#!/bin/bash
case $1 in
"start")
/var/lib/Zope2.8/instances/bin/zopectl start
echo "Zope started"
;;
"stop")
/var/lib/Zope2.8/instances/bin/zopectl stop
echo "Zope stopped"
;;
"restart")
/var/lib/Zope2.8/instances/bin/zopectl restart
echo "Zope restarted"
;;
esac

This way you can use it with /etc/init.d/zope.sh {start,stop,restart}

But, on debian (and thus I think on ubuntu), you must add this script to 
the default run level with the commands:

> su
# cd /etc/init.d
# chmod +x zope.sh
# update-rc.d zope.sh defaults

Then, if you reboot your ubuntu distro, zope should automatically be 
started.


HTH,

Chris Withers wrote:


Jens Vagelpohl wrote:



Zope itself does not ship with an init.d script. So yes, this is 
most  likely a distribution/packaging issue that should be brought to 
the  packagers' attention.



FWIW, I've always found symlinking zopectl into init.d to work just 
fine...


Chris




--
Christophe Gravier
Laboratoire DIOM, groupe SATIn - Doctorant
ISTASE - Ingénieur d'études
Perso: http://perso.univ-st-etienne.fr/gravchri/
SATIn: http://www.istase.com/satin
Tel : 04 7748 5034

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] init.d script and out of place instances

2005-11-24 Thread Chris Withers

Jens Vagelpohl wrote:


Zope itself does not ship with an init.d script. So yes, this is most  
likely a distribution/packaging issue that should be brought to the  
packagers' attention.


FWIW, I've always found symlinking zopectl into init.d to work just fine...

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] init.d script and out of place instances

2005-11-23 Thread Jens Vagelpohl


On 23 Nov 2005, at 23:59, Fernando Martins wrote:



Hi,

As far as I can see and tried, the zope2.8 script only deals with  
instances

which are created in the default instance directory,
/var/lib/zope2.8/instance/.

I would prefer to keep a specific instance of zope in a different  
directory,
together with other related directories, e.g. files from LocalFS.  
That is, I
prefer to have all directories of the application, zope or not,  
under a

common directory. Is there anything wrong with this approach??

I tried to symlink into the instance into /var/lib/zope2.8/instance  
but the
start script fails. BTW, where are the messages logged? (I'm  
running Ubuntu)


Is there any solution? Is this specific to the distribution?


Zope itself does not ship with an init.d script. So yes, this is most  
likely a distribution/packaging issue that should be brought to the  
packagers' attention.


jens

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] init.d script and out of place instances

2005-11-23 Thread Andreas Pakulat
On 23.11.05 23:59:34, Fernando Martins wrote:
> As far as I can see and tried, the zope2.8 script only deals with instances
> which are created in the default instance directory,
> /var/lib/zope2.8/instance/.

That could be, I don't have Zope2.8 installed here...

> I would prefer to keep a specific instance of zope in a different directory,
> together with other related directories, e.g. files from LocalFS. That is, I
> prefer to have all directories of the application, zope or not, under a
> common directory. Is there anything wrong with this approach??

Not necessarily.

> I tried to symlink into the instance into /var/lib/zope2.8/instance but the
> start script fails. BTW, where are the messages logged? (I'm running Ubuntu)

What messages do you mean? The ones that you see when you run
/etc/init.d/zope start? I don't know about Ubuntu, but on Debian those
are only logged when the scripts are run during bootup. These are put
into /var/log/boot by the bootlogd. Errors that each instance produces
should be in the log files in $INSTANCE_HOME/log

> Is there any solution?

Sure built Zope from Source and run mkzopeinstance with a full path.

> Is this specific to the distribution?

Not specific to Ubuntu, but I guess specific to distribution-packages of
Zope. You'll find that many Zope-People rather built Zope themselves
than relying on distribution packages. There were (are?) some issues
with the distribution packages and with the packagers not doing their
job right, or trying to do "too much"...

Andreas

-- 
Excellent time to become a missing person.
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] init.d script and out of place instances

2005-11-23 Thread Fernando Martins

Hi,

As far as I can see and tried, the zope2.8 script only deals with instances
which are created in the default instance directory,
/var/lib/zope2.8/instance/.

I would prefer to keep a specific instance of zope in a different directory,
together with other related directories, e.g. files from LocalFS. That is, I
prefer to have all directories of the application, zope or not, under a
common directory. Is there anything wrong with this approach??

I tried to symlink into the instance into /var/lib/zope2.8/instance but the
start script fails. BTW, where are the messages logged? (I'm running Ubuntu)

Is there any solution? Is this specific to the distribution?

Regards,
Fernando


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )