[Zope3-dev] zopectl in linux-ha environment

Markus Leist ml_zope3_dev at ikom-online.de
Thu Jan 5 08:34:13 EST 2006


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:
[root at IKOMtrol_ha1 /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?


More information about the Zope3-dev mailing list