From a3b4b97c2df3e54975bf36f0f1bf5930cf3a1ffc Mon Sep 17 00:00:00 2001 From: paukstelis Date: Sun, 2 Jul 2023 09:34:01 -0400 Subject: [PATCH] fix camera port detection (#99) --- cameras.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cameras.sh b/cameras.sh index a2110af..f1d142f 100755 --- a/cameras.sh +++ b/cameras.sh @@ -220,9 +220,9 @@ add_camera() { echo fi - - CAMPORT=$(tail -1 /etc/octoprint_cameras 2>/dev/null | sed -n -e 's/^.*\(port:\) \(.*\)/\2/p') - + + CAMPORT=$(tail -1 /etc/octoprint_cameras 2>/dev/null | sed -n -e 's/^.*port:\([[:graph:]]*\) \(.*\)/\1/p') + if [ -z "$CAMPORT" ]; then CAMPORT=8000 fi