Ncast telepresenter reference manual – NCast Telepresenter M4 User Manual

Page 90

Advertising
background image

NCast Telepresenter Reference Manual

if ($passwd == "") then

echo "m4files: M4 password required"
echo "Usage: m4files.tcsh host password"
exit 1

endif

# Get list of current archive files

if (-e m4-filelist) then
rm -f m4-filelist
endif

wget $verbosity --output-document=m4-filelist --http-user=backup --http-passwd=$passwd http://
$m4ip/backup/list.cgi

if ($status != 0) then
echo "m4files: Error in accessing archive"
exit 1
endif

if (! -e m4-filelist) then
echo "m4files: Failed to retrieve archive file list"
exit 1
endif

if (-z m4-filelist) then
echo "m4files: No archive files in list"
exit 1
endif

# Process all files in the list that was downloaded

foreach mp4 (`cat m4-filelist`)

# Get the media file

echo "m4files: Retrieving media file $mp4"
wget $verbosity --timestamping --http-user=backup --http-passwd=$passwd http://
$m4ip/backup/download/$mp4

if ($status != 0) then
echo "m4files: Error in accessing media file $mp4"
exit 1
endif

# Get the associated xml description file

set xml = $mp4:r.xml

echo "m4files: Retrieving xml file $xml"
wget $verbosity --timestamping --http-user=backup --http-passwd=$passwd http://
$m4ip/backup/download/$xml

if ($status != 0) then
echo "m4files: Error in accessing xml file $xml"
exit 1
endif

# Delete the file if it was downloaded and if the delete option was set (argument 3 == "delete")

if ($deleteoption == "delete" && -e $mp4 && -s $mp4) then
echo "m4files: Deleting archive file $mp4"
wget $verbosity --http-user=backup --http-passwd=$passwd --output-document=$mp4:r.msg http://
$m4ip/backup/remove.cgi\?file=$mp4

if ($status != 0) then
echo "m4files: Error in deleting media file $mp4"
exit 1

NCast Corporation

Revision 2.2

Page 90

Advertising
This manual is related to the following products: