mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 13:46:32 +00:00
extractl.py: fix OS_DEBUG updating
This commit is contained in:
parent
379645fb15
commit
fa4be1dd3b
@ -311,6 +311,13 @@ def _set_motioneye_settings(s):
|
||||
f.write(line)
|
||||
|
||||
# also update debug in os.conf
|
||||
cmd = 'grep -E "^OS_DEBUG" %s &>/dev/null' % OS_CONF
|
||||
try:
|
||||
subprocess.check_call(cmd, shell=True)
|
||||
|
||||
except subprocess.CalledProcessError: # OS_DEBUG not present
|
||||
os.system('echo OS_DEBUG=\\"false\\" >> %s' % OS_CONF)
|
||||
|
||||
if debug:
|
||||
cmd = "sed -i -r 's/OS_DEBUG=\"?false\"?/OS_DEBUG=\"true\"/' %s" % OS_CONF
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user