Commit 94462aca authored by Amos Latteier's avatar Amos Latteier

Added an undocumented '-S' for Service switch to z2.py which allows the NT service to let

Zope know that it can handle restarts.
parent 2fee3425
......@@ -288,6 +288,6 @@ if __name__=='__main__':
if win32serviceutil.GetServiceCustomOption(ZServerService,'start') is None:
import string, os.path
home=string.split(sys.argv[0],'ZServer')[0]
command='"%s" "%s"' % (sys.executable, os.path.join(home,'z2.py'))
command='"%s" "%s" -S' % (sys.executable, os.path.join(home,'z2.py'))
set_start_command(command)
print "Setting ZServer start command to:", command
......@@ -288,6 +288,6 @@ if __name__=='__main__':
if win32serviceutil.GetServiceCustomOption(ZServerService,'start') is None:
import string, os.path
home=string.split(sys.argv[0],'ZServer')[0]
command='"%s" "%s"' % (sys.executable, os.path.join(home,'z2.py'))
command='"%s" "%s" -S' % (sys.executable, os.path.join(home,'z2.py'))
set_start_command(command)
print "Setting ZServer start command to:", command
......@@ -260,7 +260,7 @@ try:
if string.split(sys.version)[0] < '1.5.2':
raise 'Invalid python version', string.split(sys.version)[0]
opts, args = getopt.getopt(sys.argv[1:], 'hz:Z:t:a:d:u:w:f:p:m:l:2DP:')
opts, args = getopt.getopt(sys.argv[1:], 'hz:Z:t:a:d:u:w:f:p:m:Sl:2DP:')
# Get environment variables
for a in args:
......@@ -285,6 +285,7 @@ try:
elif o=='-d': DNS_IP=v
elif o=='-u': UID=v
elif o=='-D': os.environ['Z_DEBUG_MODE']='1'
elif o=='-S': sys.ZMANAGED=1
elif o=='-m':
if v:
try:
......
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