Commit 19347e97 authored by Evan Simpson's avatar Evan Simpson

Change use of ZEO dict

parent df4fccfb
...@@ -25,8 +25,8 @@ ZOPE_HOME = '/usr/local/zope_soft' ...@@ -25,8 +25,8 @@ ZOPE_HOME = '/usr/local/zope_soft'
# ZEO # ZEO
# If ZEO is installed, then ZEO_SERVER_NAME and ZEO_SERVER_PORT are required # If ZEO is installed, then ZEO_SERVER_NAME and ZEO_SERVER_PORT are required
#ZEO['ZEO_SERVER_NAME'] = '10.0.0.1' #ZEO['SERVER_NAME'] = '10.0.0.1'
#ZEO['ZEO_SERVER_PORT'] = 2221 #ZEO['SERVER_PORT'] = 2221
# ZEO_WAIT_BAILOUT may be used to specify how many seconds zctl.py # ZEO_WAIT_BAILOUT may be used to specify how many seconds zctl.py
# should wait for ZEO to start before giving up # should wait for ZEO to start before giving up
......
...@@ -77,7 +77,7 @@ execfile(ZOPE_CONFIG, globals()) ...@@ -77,7 +77,7 @@ execfile(ZOPE_CONFIG, globals())
env['INSTANCE_HOME'] = HERE env['INSTANCE_HOME'] = HERE
env['PYTHONHOME'] = ZOPE_HOME = abspath(ZOPE_HOME) env['PYTHONHOME'] = ZOPE_HOME = abspath(ZOPE_HOME)
for k, v in ZEO.items(): for k, v in ZEO.items():
env[k] = str(v) env['ZEO_'+k] = str(v)
# Commands # Commands
...@@ -102,7 +102,7 @@ def zctl_start(args): ...@@ -102,7 +102,7 @@ def zctl_start(args):
clients.append('default') clients.append('default')
cmd = '%s "%s/z2.py" %%s' % (PYTHON, ZOPE_HOME) cmd = '%s "%s/z2.py" %%s' % (PYTHON, ZOPE_HOME)
global ZOPE_PORT, ZOPE_LOG, ZOPE_OPTS, ZOPE_ENV, ZEO_ENV global ZOPE_PORT, ZOPE_LOG, ZOPE_OPTS, ZOPE_ENV
for client in clients: for client in clients:
args = list(zope_args) args = list(zope_args)
if client != 'default': if client != 'default':
...@@ -132,8 +132,8 @@ def zctl_start_zeo(args): ...@@ -132,8 +132,8 @@ def zctl_start_zeo(args):
"""Try to start ZEO.""" """Try to start ZEO."""
for item in ZEO_ENV.items(): for item in ZEO_ENV.items():
args.append("%s=%s" % item) args.append("%s=%s" % item)
host = ZEO.get('ZEO_SERVER_NAME', 'localhost') host = ZEO.get('SERVER_NAME', 'localhost')
port = ZEO['ZEO_SERVER_PORT'] port = ZEO['SERVER_PORT']
if host == 'localhost' and not _check_for_service(host, port): if host == 'localhost' and not _check_for_service(host, port):
print "Starting ZEO server on", port print "Starting ZEO server on", port
cmd = '%s %s/lib/python/ZEO/start.py -p %s %s &' % ( cmd = '%s %s/lib/python/ZEO/start.py -p %s %s &' % (
...@@ -185,8 +185,8 @@ def zctl_status(args): ...@@ -185,8 +185,8 @@ def zctl_status(args):
"""Print status.""" """Print status."""
print "NAME\tPORT\tPIDS" print "NAME\tPORT\tPIDS"
if ZEO: if ZEO:
host = ZEO.get('ZEO_SERVER_NAME', 'localhost') host = ZEO.get('SERVER_NAME', 'localhost')
port = ZEO['ZEO_SERVER_PORT'] port = ZEO['SERVER_PORT']
pids = '' pids = ''
if _check_for_service(host, port): if _check_for_service(host, port):
if host == 'localhost': if host == 'localhost':
......
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