Closed davisagli closed 6 years ago
I have no time to review this now. @tschorr can you check this? It also seems to fix #2606 which is a nice bonus.
Thanks for taking a look @tschorr. I agree with your points and will try to work on them this week at ploneconf.
I like the idea but do not know the code enough to be able to review it deeply.
@tschorr I merged the zopectl module into ctl and copied the tests from ZServer.
This is a pretty big change to how plone.recipe.zope2instance handles WSGI-based instances, to make them work more similarly to ZServer-based instances. Specifically, it now generates a "bin/instance" wrapper script that uses zdaemon, with the same commands. This means it's possible to do bin/instance fg|console|debug|run|adduser|start|stop|etc just like before. For WSGI it runs the Zope2.Startup.serve module and for ZServer it runs ZServer.Zope2.Startup.run.
Admins who want to skip the zdaemon script and use a simpler WSGI deployment for actually serving the site can do that, but now they won't have to hunt for a new way to run a script, get a debug console, or reset the admin password.
The 2 big new files here were mostly copied in from other places: zopectl.py came from ZServer with a few changes to make it work in the new location. wsgischema.xml is like the one in Zope 4 but with a few additions from ZServer's zopeschema.xml to accept zdaemon-related options.