[FIX] win32 service: configure service via sc.exe

bzr revid: chs@openerp.com-20121130165046-l1ezj4ykrhnyfzjp
This commit is contained in:
Christophe Simonis 2012-11-30 17:50:46 +01:00
parent 050f65c21e
commit 3ff3f1f87f
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ def option_handler(opts):
# configure the service to auto restart on failures...
service_name = OpenERPServerService._svc_name
subprocess.call('sc failure %s reset= 0 actions= restart/0/restart/0/restart/0' % (service_name,))
subprocess.call(['sc', 'failure', service_name, 'reset=', '0', 'actions=', 'restart/0/restart/0/restart/0'])
# hscm = win32service.OpenSCManager(None, None, win32service.SC_MANAGER_ALL_ACCESS)
# try: