REFACTOR: Avoid SC2001 in func log_output
* Cleanup: Deleted unused 'debug' Variable in func print_cams * Cleanup: removed redirection to /dev/null of func print_cams Signed-off-by: Stephan Wendel <me@stephanwe.de>
This commit is contained in:
parent
4196b0d72f
commit
29594c6139
@ -67,7 +67,7 @@ function log_output {
|
|||||||
fi
|
fi
|
||||||
if [ -n "${line}" ]; then
|
if [ -n "${line}" ]; then
|
||||||
# sed is needed to prettify ustreamers output
|
# sed is needed to prettify ustreamers output
|
||||||
logger -t webcamd "$(echo ${line} | sed 's/^--/ustreamer/')"
|
echo "${line//^--/ustreamer}" | logger -t webcamd
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -82,12 +82,11 @@ function print_cfg {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function print_cams {
|
function print_cams {
|
||||||
local count raspicam total debug
|
local count raspicam total
|
||||||
debug="$(get_param "webcamd" debug_log 2> /dev/null)"
|
|
||||||
count="$(find /dev/v4l/by-id/ 2> /dev/null | sed '1d;1~2d' | wc -l)"
|
count="$(find /dev/v4l/by-id/ 2> /dev/null | sed '1d;1~2d' | wc -l)"
|
||||||
total="$((count+$(detect_raspicam)))"
|
total="$((count+$(detect_raspicam)))"
|
||||||
if [ "${total}" -eq 0 ]; then
|
if [ "${total}" -eq 0 ]; then
|
||||||
log_msg "ERROR: No usable Cameras Found. Stopping $(basename "$0")."
|
log_msg "ERROR: No usable Cameras Found. Stopping $(basename "${0}")."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
log_msg "INFO: Found ${total} available Camera(s)"
|
log_msg "INFO: Found ${total} available Camera(s)"
|
||||||
@ -103,4 +102,4 @@ function print_cams {
|
|||||||
list_cam_formats "${raspicam}"
|
list_cam_formats "${raspicam}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
} 2> /dev/null
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user