Script Keepalive Examples
HTTP List Keepalive
Cisco Content Services Switch Administration Guide
8-50
no set EXIT_MSG
socket disconnect ${SOCKET}
exit script 0
!no echo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Filename: ap-kal-httplist
! Parameters: Site1 WebPage1 Site2 WebPage2 [...]
!
! Description:
!
This script will connect a list of sites/webpage pairs.
!
user must simply supply the site, and then the webpage and
!
we'll attempt to do an HTTP HEAD on that page.
!
! Failure Upon:
!
1. Not establishing a connection with the host.
!
2. Not receiving a status code 200 on the HEAD request on any
!
one site.
If one fails, the script fails.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Make sure the user has a qualified number of arguments
if ${ARGS}[#] "LT" "2"
echo "Usage: ap-kal-httplist \'WebSite1 WebPage1 WebSite2 WebPage2
...'"
exit script 1
endbranch
while ${ARGS}[#] "GT" "0"
set Site "${ARGS}[1]"
var-shift ARGS
if ${ARGS}[#] "==" "0"
set EXIT_MSG "Parameter mismatch: hostname present but webpage
was not"
exit script 1
endbranch
set Page "${ARGS}[1]"
var-shift ARGS
no set EXIT_MSG
function HeadUrl call "${Site} ${Page}"
endbranch
exit script 0
function HeadUrl begin
Chapter 8
Using the CSS Scripting Language
The
OL-5647-02