Commit dbc804e9 authored by Chris McDonough's avatar Chris McDonough

Reenable web-controlled restart under the zdctl regime.

parent fd4fad51
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
############################################################################## ##############################################################################
__doc__="""System management components""" __doc__="""System management components"""
__version__='$Revision: 1.87 $'[11:-2] __version__='$Revision: 1.88 $'[11:-2]
import sys,os,time,Globals, Acquisition, os, Undo import sys,os,time,Globals, Acquisition, os, Undo
from Globals import DTMLFile from Globals import DTMLFile
...@@ -318,10 +318,7 @@ class ApplicationManager(Folder,CacheManager): ...@@ -318,10 +318,7 @@ class ApplicationManager(Folder,CacheManager):
if s >= 1048576.0: return '%.1fM' % (s/1048576.0) if s >= 1048576.0: return '%.1fM' % (s/1048576.0)
return '%.1fK' % (s/1024.0) return '%.1fK' % (s/1024.0)
if os.environ.has_key('ZMANAGED'):
if hasattr(sys, 'ZMANAGED'):
manage_restartable=1 manage_restartable=1
def manage_restart(self, URL1): def manage_restart(self, URL1):
"""Shut down the application""" """Shut down the application"""
......
...@@ -117,6 +117,11 @@ class ZopeCmd(ZDCmd): ...@@ -117,6 +117,11 @@ class ZopeCmd(ZDCmd):
args = [opt, svalue] args = [opt, svalue]
return args return args
def do_start(self, arg):
# signal to Zope that it is being managed
#(to indicate it's web-restartable)
os.putenv('ZMANAGED', '1')
ZDCmd.do_start(self, arg)
def main(args=None): def main(args=None):
# This is exactly like zdctl.main(), but uses ZopeCtlOptions and # This is exactly like zdctl.main(), but uses ZopeCtlOptions and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment