cameraport gt 7000

This commit is contained in:
paukstelis
2023-03-05 09:26:31 -05:00
parent 13a4d0f6bb
commit 928565685e

View File

@@ -490,18 +490,26 @@ add_camera() {
echo echo
fi fi
echo "Camera Port (ENTER will increment last value in /etc/camera_ports):" while true; do
read CAMPORT echo "Camera Port (ENTER will increment last value in /etc/camera_ports):"
if [ -z "$CAMPORT" ]; then read CAMPORT
CAMPORT=$(tail -1 /etc/camera_ports) if [ -z "$CAMPORT" ]; then
CAMPORT=$(tail -1 /etc/camera_ports)
if [ -z "$CAMPORT" ]; then if [ -z "$CAMPORT" ]; then
CAMPORT=8000 CAMPORT=8000
fi fi
CAMPORT=$((CAMPORT+1)) CAMPORT=$((CAMPORT+1))
echo Selected port is: $CAMPORT | log
if [[ $CAMPORT -gt 7000 ]]; then
break
else
echo "Camera Port must be greater than 7000"
fi
fi fi
done
echo "Settings can be modified after initial setup in /etc/systemd/system/cam${INUM}_$INSTANCE.service" echo "Settings can be modified after initial setup in /etc/systemd/system/cam${INUM}_$INSTANCE.service"
echo echo
while true; do while true; do