System information

Shell Script Examples
Axis Communications AB provides NO support for application development of any kind. The information
here is provided "as is", and there is no guarantee that any of the examples shown will work in your
particular application.
Revision 1.02 October 2002 84
OK=1 # The image has been found
# Path of the image
source_file=$source_file"/"$tmp
fi
fi
done
# FTP connection
if [ x$passive_mode = xyes ]; then # Passive mode
sftpclient -L -s -m $ftp_server -n $port -c
$seq_destination -k /tmp/$3 -u $user -w $pass
else # Non passive mode
sftpclient -L -m $ftp_server -n $port -c
$seq_destination -k /tmp/$3 -u $user -w $pass
fi
if [ $? -eq 1 ]; then # If an error appeared
logger -t $0[$$] FTP failed! # Log this error
exit=1 # Exit the script
else
rm $source_file # Delete the files uploaded
fi
fi
done
# Reset buffers
bufferd -reset -buffername $3
6.2.5.1 TASK.LIST
This task.list can be used to run the script above.
# When the server is running, start capturing images in a buffer named
# IO0 with 2 pre and post-alarm pictures, 1000 ms of delay between pre
# and post images with the specified URI.
once immune % /bin/bufferd : -start -buffername IO0 -pre 2 -post 2 -predelay
1000 -postdelay 1000 -uri ftp://jpg/1/352x288.jpg;
# If a positive transition is detected on the IO port 0, execute the
# script for the first camera and the buffer named IO0 (the same as the
# previous started one) and take snapshot in a buffer named SNAP3
date(w(0,1,2,3,4,5,6)) pattern ((IO0:/)) immune once %
/etc/scripts/alarm_ftp_alarm_ftp_note_smtp_net : CAM1 IO0 SNAP3;