From b38281d7ae27bda1f3779b47ae79a2d7e35a1f10 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Mon, 12 Oct 2015 21:40:22 +0300 Subject: [PATCH] always use python meyectl.py for internal commands --- motioneye/meyectl.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/motioneye/meyectl.py b/motioneye/meyectl.py index b31a565..5ba7f57 100755 --- a/motioneye/meyectl.py +++ b/motioneye/meyectl.py @@ -34,11 +34,8 @@ _LOG_FILE = 'motioneye.log' def find_command(command): - cmd = sys.argv[0] - if not cmd.startswith('/'): - cmd = os.path.join(os.getcwd(), cmd) - if cmd.count('meyectl.py'): # prepend the python command if ran with py(c) file - cmd = sys.executable + ' ' + cmd + cmd = __file__ + cmd = sys.executable + ' ' + cmd cmd = cmd.replace('-b', '') # remove server-specific options cmd += ' %s ' % command cmd += ' '.join([pipes.quote(arg) for arg in sys.argv[2:] -- 2.39.5