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 81
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)
date(w(0,1,2,3,4,5,6)) pattern ((IO0:/)) immune once %
/etc/scripts/alarm_smtp_net : CAM1 IO0;
6.2.5 Example 5 – Sequential Upload with Notification via E-mail
This script will upload sequential images specified via FTP. The uploaded images will be
ordered in a structure defined by their date. Images from the alarm buffers will be uploaded and
an e-mail will be sent, as specified by the appropriate parameters.
The following variables defined in the config file of the camera are used in this script:
# --- General camera parameters ---
# The index of the name(s) of the buffer(s) started
sources="1"
# The format of the images specified to be taken according to HTTP-API
image_format="fullsize"
# The name to be given to the local file, excluding the extension
file_format="snapshot"
# Number of pre alarm images to be taken
pre=2
# Number of post alarm images to be taken
post=2
# Delay between pre-images in milliseconds
predelay=1000
# Delay between post-images in milliseconds
postdelay=1000
# Delay between image taken
delay=2000
# The time in seconds to stay in the script. A value of -1 means
# indefinitely
time=10
# The index of the name(s) of the buffer(s) started for sequential
# images
seq_sources="1"
# The format of the images specified to be taken according to the HTTP-
# API for the sequential images
seq_image_format="fullsize"
# --- FTP parameters ---
# The server to upload to
ftp_server="10.13.9.210"
# The port to connect to
port=21
# The user to login as
user=user
# The pass to use for the user
pass=pass
# Choose passive mode on ("yes") or off ("no") (See documentation on
# FTP protocol)
passive_mode="no"
# The path to append to all uploads. This path must exist on the
# server prior to upload
destination="upload/2400test"