diff --git a/board/raspberrypi/motioneye-modules/streameyectl.py b/board/raspberrypi/motioneye-modules/streameyectl.py index 5f751332f4..e3388c4371 100644 --- a/board/raspberrypi/motioneye-modules/streameyectl.py +++ b/board/raspberrypi/motioneye-modules/streameyectl.py @@ -187,13 +187,13 @@ def _set_streameye_enabled(enabled): config._camera_ids_cache = [] logging.debug('disabling all cameras in motion.conf') - cmd = 'sed -r -i "s/^thread (.*)/#thread \\1/" /data/etc/motion.conf &>/dev/null' + cmd = 'sed -r -i "s/^camera (.*)/#camera \\1/" /data/etc/motion.conf &>/dev/null' if os.system(cmd): logging.error('failed to disable cameras in motion.conf') - logging.debug('renaming thread files') + logging.debug('renaming camera files') for name in os.listdir(settings.CONF_PATH): - if re.match('^thread-\d+.conf$', name): + if re.match('^camera-\d+.conf$', name): os.rename(os.path.join(settings.CONF_PATH, name), os.path.join(settings.CONF_PATH, name + '.bak')) logging.debug('adding simple mjpeg camera') @@ -231,9 +231,9 @@ def _set_streameye_enabled(enabled): if camera_config.get('@proto') == 'mjpeg': config.rem_camera(camera_id) - logging.debug('renaming thread files') + logging.debug('renaming camera files') for name in os.listdir(settings.CONF_PATH): - if re.match('^thread-\d+.conf.bak$', name): + if re.match('^camera-\d+.conf.bak$', name): os.rename(os.path.join(settings.CONF_PATH, name), os.path.join(settings.CONF_PATH, name[:-4])) _streameye_enabled = False diff --git a/board/raspberrypi/overlay/etc/init.d/S84streameye b/board/raspberrypi/overlay/etc/init.d/S84streameye index 65ca3ba78e..624bf3ece1 100755 --- a/board/raspberrypi/overlay/etc/init.d/S84streameye +++ b/board/raspberrypi/overlay/etc/init.d/S84streameye @@ -6,11 +6,11 @@ MOTIONEYE_CONF_DIR="/data/etc/" test -n "${OS_VERSION}" || source /etc/init.d/base enabled() { - test $(ls -1 ${MOTIONEYE_CONF_DIR}/thread-*.conf 2>/dev/null| wc -l) == 1 || return 1 + test $(ls -1 ${MOTIONEYE_CONF_DIR}/camera-*.conf 2>/dev/null| wc -l) == 1 || return 1 - grep '# @proto mjpeg' ${MOTIONEYE_CONF_DIR}/thread-1.conf &>/dev/null || return 1 + grep '# @proto mjpeg' ${MOTIONEYE_CONF_DIR}/camera-1.conf &>/dev/null || return 1 - grep -E '# @url http://(.*)127.0.0.1:' ${MOTIONEYE_CONF_DIR}/thread-1.conf &>/dev/null || return 1 + grep -E '# @url http://(.*)127.0.0.1:' ${MOTIONEYE_CONF_DIR}/camera-1.conf &>/dev/null || return 1 return 0 } diff --git a/board/raspberrypi2/motioneye-modules/streameyectl.py b/board/raspberrypi2/motioneye-modules/streameyectl.py index 5f751332f4..e3388c4371 100644 --- a/board/raspberrypi2/motioneye-modules/streameyectl.py +++ b/board/raspberrypi2/motioneye-modules/streameyectl.py @@ -187,13 +187,13 @@ def _set_streameye_enabled(enabled): config._camera_ids_cache = [] logging.debug('disabling all cameras in motion.conf') - cmd = 'sed -r -i "s/^thread (.*)/#thread \\1/" /data/etc/motion.conf &>/dev/null' + cmd = 'sed -r -i "s/^camera (.*)/#camera \\1/" /data/etc/motion.conf &>/dev/null' if os.system(cmd): logging.error('failed to disable cameras in motion.conf') - logging.debug('renaming thread files') + logging.debug('renaming camera files') for name in os.listdir(settings.CONF_PATH): - if re.match('^thread-\d+.conf$', name): + if re.match('^camera-\d+.conf$', name): os.rename(os.path.join(settings.CONF_PATH, name), os.path.join(settings.CONF_PATH, name + '.bak')) logging.debug('adding simple mjpeg camera') @@ -231,9 +231,9 @@ def _set_streameye_enabled(enabled): if camera_config.get('@proto') == 'mjpeg': config.rem_camera(camera_id) - logging.debug('renaming thread files') + logging.debug('renaming camera files') for name in os.listdir(settings.CONF_PATH): - if re.match('^thread-\d+.conf.bak$', name): + if re.match('^camera-\d+.conf.bak$', name): os.rename(os.path.join(settings.CONF_PATH, name), os.path.join(settings.CONF_PATH, name[:-4])) _streameye_enabled = False diff --git a/board/raspberrypi2/overlay/etc/init.d/S84streameye b/board/raspberrypi2/overlay/etc/init.d/S84streameye index 65ca3ba78e..624bf3ece1 100755 --- a/board/raspberrypi2/overlay/etc/init.d/S84streameye +++ b/board/raspberrypi2/overlay/etc/init.d/S84streameye @@ -6,11 +6,11 @@ MOTIONEYE_CONF_DIR="/data/etc/" test -n "${OS_VERSION}" || source /etc/init.d/base enabled() { - test $(ls -1 ${MOTIONEYE_CONF_DIR}/thread-*.conf 2>/dev/null| wc -l) == 1 || return 1 + test $(ls -1 ${MOTIONEYE_CONF_DIR}/camera-*.conf 2>/dev/null| wc -l) == 1 || return 1 - grep '# @proto mjpeg' ${MOTIONEYE_CONF_DIR}/thread-1.conf &>/dev/null || return 1 + grep '# @proto mjpeg' ${MOTIONEYE_CONF_DIR}/camera-1.conf &>/dev/null || return 1 - grep -E '# @url http://(.*)127.0.0.1:' ${MOTIONEYE_CONF_DIR}/thread-1.conf &>/dev/null || return 1 + grep -E '# @url http://(.*)127.0.0.1:' ${MOTIONEYE_CONF_DIR}/camera-1.conf &>/dev/null || return 1 return 0 } diff --git a/board/raspberrypi2/overlay/usr/bin/streameye.sh b/board/raspberrypi2/overlay/usr/bin/streameye.sh index 468b9bb1c2..612ad76ea1 100755 --- a/board/raspberrypi2/overlay/usr/bin/streameye.sh +++ b/board/raspberrypi2/overlay/usr/bin/streameye.sh @@ -54,7 +54,7 @@ function start() { function stop() { # stop the streameye background watch process - ps | grep streameye.sh | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + ps | grep streameye.sh | grep -v $$ | grep -v S94streameye| grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill # stop the raspimjpeg process pid=$(ps | grep raspimjpeg.py | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1) diff --git a/board/raspberrypi3/motioneye-modules/streameyectl.py b/board/raspberrypi3/motioneye-modules/streameyectl.py index 5f751332f4..e3388c4371 100644 --- a/board/raspberrypi3/motioneye-modules/streameyectl.py +++ b/board/raspberrypi3/motioneye-modules/streameyectl.py @@ -187,13 +187,13 @@ def _set_streameye_enabled(enabled): config._camera_ids_cache = [] logging.debug('disabling all cameras in motion.conf') - cmd = 'sed -r -i "s/^thread (.*)/#thread \\1/" /data/etc/motion.conf &>/dev/null' + cmd = 'sed -r -i "s/^camera (.*)/#camera \\1/" /data/etc/motion.conf &>/dev/null' if os.system(cmd): logging.error('failed to disable cameras in motion.conf') - logging.debug('renaming thread files') + logging.debug('renaming camera files') for name in os.listdir(settings.CONF_PATH): - if re.match('^thread-\d+.conf$', name): + if re.match('^camera-\d+.conf$', name): os.rename(os.path.join(settings.CONF_PATH, name), os.path.join(settings.CONF_PATH, name + '.bak')) logging.debug('adding simple mjpeg camera') @@ -231,9 +231,9 @@ def _set_streameye_enabled(enabled): if camera_config.get('@proto') == 'mjpeg': config.rem_camera(camera_id) - logging.debug('renaming thread files') + logging.debug('renaming camera files') for name in os.listdir(settings.CONF_PATH): - if re.match('^thread-\d+.conf.bak$', name): + if re.match('^camera-\d+.conf.bak$', name): os.rename(os.path.join(settings.CONF_PATH, name), os.path.join(settings.CONF_PATH, name[:-4])) _streameye_enabled = False diff --git a/board/raspberrypi3/overlay/etc/init.d/S84streameye b/board/raspberrypi3/overlay/etc/init.d/S84streameye index 65ca3ba78e..624bf3ece1 100755 --- a/board/raspberrypi3/overlay/etc/init.d/S84streameye +++ b/board/raspberrypi3/overlay/etc/init.d/S84streameye @@ -6,11 +6,11 @@ MOTIONEYE_CONF_DIR="/data/etc/" test -n "${OS_VERSION}" || source /etc/init.d/base enabled() { - test $(ls -1 ${MOTIONEYE_CONF_DIR}/thread-*.conf 2>/dev/null| wc -l) == 1 || return 1 + test $(ls -1 ${MOTIONEYE_CONF_DIR}/camera-*.conf 2>/dev/null| wc -l) == 1 || return 1 - grep '# @proto mjpeg' ${MOTIONEYE_CONF_DIR}/thread-1.conf &>/dev/null || return 1 + grep '# @proto mjpeg' ${MOTIONEYE_CONF_DIR}/camera-1.conf &>/dev/null || return 1 - grep -E '# @url http://(.*)127.0.0.1:' ${MOTIONEYE_CONF_DIR}/thread-1.conf &>/dev/null || return 1 + grep -E '# @url http://(.*)127.0.0.1:' ${MOTIONEYE_CONF_DIR}/camera-1.conf &>/dev/null || return 1 return 0 } diff --git a/board/raspberrypi3/overlay/usr/bin/streameye.sh b/board/raspberrypi3/overlay/usr/bin/streameye.sh index 468b9bb1c2..612ad76ea1 100755 --- a/board/raspberrypi3/overlay/usr/bin/streameye.sh +++ b/board/raspberrypi3/overlay/usr/bin/streameye.sh @@ -54,7 +54,7 @@ function start() { function stop() { # stop the streameye background watch process - ps | grep streameye.sh | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + ps | grep streameye.sh | grep -v $$ | grep -v S94streameye| grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill # stop the raspimjpeg process pid=$(ps | grep raspimjpeg.py | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1)