From e709ad37db7bd66f0b5673c12596549296f0409a Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 4 Oct 2015 20:36:06 +0300 Subject: [PATCH] meyectl: minor find_command improvement --- motioneye/meyectl.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/motioneye/meyectl.py b/motioneye/meyectl.py index af51366..b31a565 100755 --- a/motioneye/meyectl.py +++ b/motioneye/meyectl.py @@ -37,6 +37,8 @@ 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 = cmd.replace('-b', '') # remove server-specific options cmd += ' %s ' % command cmd += ' '.join([pipes.quote(arg) for arg in sys.argv[2:] -- 2.39.5