exit -1
fi
+timeout=5
+
motioneye_conf=$1
if [ -f "$motioneye_conf" ]; then
port=$(cat $motioneye_conf | grep -E '^port' | cut -d ' ' -f 2)
data="{\"filename\": \"$filename\"}"
signature=$(echo -n "POST:$uri:$data:$password" | sha1sum | cut -d ' ' -f 1)
-curl -s -S -H "Content-Type: application/json" -X POST "http://127.0.0.1:$port$uri&_signature=$signature" -d "$data" >/dev/null
+curl -s -S -m $timeout -H "Content-Type: application/json" -X POST "http://127.0.0.1:$port$uri&_signature=$signature" -d "$data" >/dev/null