Start- und Endzeitpunkt in die Dateinamen einfügen

This commit is contained in:
root 2012-03-29 13:26:00 +02:00
parent 66252335f9
commit dac1c9d63f
1 changed files with 5 additions and 1 deletions

View File

@ -30,7 +30,11 @@ trap 'quit 0' SIGINT SIGTERM EXIT
do_record() {
for i in $CAMERAS; do
echo "starting recording for camera $i" >&2
(wget --ignore-length --http-user=$USERNAME --http-passwd=$PASSWORD http://${SERVER_IP}:$PORT/cam/$i/stream.mjpeg -O dump_cam${i}.mjpeg -q 2>&1 >> /dev/null) &
(
OUTFILE_START=dump_cam${i}_$(date +%s)
wget --ignore-length --http-user=$USERNAME --http-passwd=$PASSWORD http://${SERVER_IP}:$PORT/cam/$i/stream.mjpeg -O $OUTFILE_START -q 2>&1 >> /dev/null
mv $OUTFILE_START OUTFILE_START_$(date +%s).mjpg
) &
WGET_PIDS="$WGET_PIDS $!"
done