From 9a7470d94a268c720f62802f5515f4d2b62584a5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 26 Oct 2020 11:52:49 +0100 Subject: [PATCH] import new camera script Signed-off-by: Nico Schottelius --- openwrt-add-camera.sh | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/openwrt-add-camera.sh b/openwrt-add-camera.sh index 5688f0a..33d5fd3 100755 --- a/openwrt-add-camera.sh +++ b/openwrt-add-camera.sh @@ -1,11 +1,33 @@ #!/bin/sh +if [ $# -lt 1 ]; then + echo "$0 ip-address" + echo " ip-address: where to find the device" + exit 1 +fi + + +set -x + +openwrt_ip=$1; shift + +ping -c3 ${openwrt_ip} +if [ $? -ne 0 ]; then + echo "Cannot reach ${openwrt_ip}, aborting" + exit 1 +fi + +cat < /etc/motion.conf < /etc/motion.conf <