chore: use ls to look for webcamd installation

This commit is contained in:
th33xitus
2021-11-11 13:26:01 +01:00
committed by GitHub
parent fe4625d3e1
commit 36a8757cfd

View File

@@ -1,6 +1,6 @@
system_check_webui(){
### check system for installed moonraker service
if ls /etc/systemd/system/moonraker.service 2>/dev/null || ls /etc/systemd/system | grep -q -E "moonraker-[[:digit:]]+.service"; then
if ls /etc/systemd/system/moonraker.service 2>/dev/null 1>&2 || ls /etc/systemd/system | grep -q -E "moonraker-[[:digit:]]+.service"; then
moonraker_chk_ok="true"
else
moonraker_chk_ok="false"
@@ -114,7 +114,7 @@ install_webui(){
$1_port_check
### ask user to install mjpg-streamer
if [[ ! "$(systemctl list-units --full -all -t service --no-legend | grep -F "webcamd.service")" ]]; then
if ls /etc/systemd/system/webcamd.service 2>/dev/null 1>&2; then
get_user_selection_mjpg-streamer
fi