Re: [Zope3-dev] zopectl in linux-ha environment

2006-01-10 Thread Sidnei da Silva
| In zopectl:
| [...]
| if __name__ == '__main__':
| run()
| [...]
| 
| What kind of return-statement/exception i have to use?

You should add a 'sys.exit()' somewhere. Where to add it is
the question.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] zopectl in linux-ha environment

2006-01-05 Thread Markus Leist
Hello,

I am testing Zope3 in a linux-ha environment. I wrote
a resource.d-file for starting and stopping zope when
system toggles ha-mode.

snipp:
[...]
zope_status () {
  cd $ZOPEDIR   
  ./bin/zopectl status2
  rc=$?
  ha_log "info: $0: zope_status1/return=$rc"
}
[...]
(attention: 'status2' not 'status')

Result:
[EMAIL PROTECTED] /etc/ha.d/resource.d]# ./zope status
*** Unknown syntax: status2
2006/01/05_14:16:19 info: ./zope: zope_status1/return=0
[...]
(attention: return-code is 0, should be !0)

What is the correct way to get the "exit code" of "zopectl"-
script in my shell-script.

In zopectl:
[...]
if __name__ == '__main__':
run()
[...]

What kind of return-statement/exception i have to use?

Is there a chain of this return-/exception-statements for
zopectl <- zope.app.twisted.controller.main <- zdaemon.zdctl.main <- ZDCmd
?

Regards
Markus Leist

ps.
should i post the complete script to this mailing-list?
is there someone else working with linux-ha?
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com