Skip to content

Commit

Permalink
fix camera port detection (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
paukstelis authored Jul 2, 2023
1 parent 2b65e03 commit a3b4b97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cameras.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a3b4b97

Please sign in to comment.