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