From 80bf4feeed298f01cdb0253a0dd5e8f219b2131b Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Tue, 4 Nov 2014 18:21:09 +0530 Subject: [PATCH] fix setup production --- bench/production_setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bench/production_setup.py b/bench/production_setup.py index a3223568..ee0a1b11 100644 --- a/bench/production_setup.py +++ b/bench/production_setup.py @@ -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():