EasyManua.ls Logo

Cisco 11503 - CSS Content Services Switch - Page 321

Cisco 11503 - CSS Content Services Switch
392 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
8-53
Cisco Content Services Switch Administration Guide
OL-5647-02
Chapter 8 Using the CSS Scripting Language
Script Keepalive Examples
endbranch
! Defines:
set HostName “${ARGS}[1]”
set UserName “${ARGS}[2]”
set Password “${ARGS}[3]”
set EXIT_MSG “Connection Failed”
! Connect to the remote host (use default timeout)
socket connect host ${HostName} port 143 tcp
set EXIT_MSG “Waitfor: Failed”
! Wait for the OK welcome message for 600ms
socket waitfor ${SOCKET} “OK” 600
set EXIT_MSG “Send: Failed”
! Send the username to the host
socket send ${SOCKET} “a1 LOGIN ${UserName} ${Password}\n”
set EXIT_MSG “Waitfor: Failed”
! Wait for confirmation
socket waitfor ${SOCKET} “a1 OK” 200
set EXIT_MSG “Send: Failed”
! Send the password
socket send ${SOCKET} “a2 LOGOUT\n”
set EXIT_MSG “Waitfor: Failed”
! Wait for confirmation
socket waitfor ${SOCKET} “a2 OK” 200
! We've successfully logged in, the server is up and going.
! The job was done successfully.
socket disconnect ${SOCKET}
no set EXIT_MSG
exit script 0

Table of Contents

Other manuals for Cisco 11503 - CSS Content Services Switch

Related product manuals