From: Calin Crisan Date: Sun, 4 Oct 2015 17:36:06 +0000 (+0300) Subject: meyectl: minor find_command improvement X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=e709ad37db7bd66f0b5673c12596549296f0409a;p=motioneye-debian meyectl: minor find_command improvement --- 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:]