2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-09 16:36:25 +00:00

fix setup production

This commit is contained in:
Pratik Vyas 2014-11-04 18:21:09 +05:30
parent bbcc8d1745
commit 80bf4feeed

View File

@ -6,9 +6,9 @@ def restart_service(service):
program = get_program(['systemctl', 'service'])
if not program:
raise Exception, 'No service manager found'
elif program == 'systemctl':
elif os.path.basename(program) == 'systemctl':
exec_cmd("{prog} restart {service}".format(prog=program, service=service))
elif program == 'service':
elif os.path.basename(program) == 'service':
exec_cmd("{prog} {service} restart ".format(prog=program, service=service))
def get_supervisor_confdir():