Learn OpenScript

Managing OpenScripts

by Derek_Kang on ‎01-09-2012 02:46 PM (463 Views)

Generally speaking, you will write a script outside the ADX, perhaps, using your preferred editor on your PC. Once a script has been written, it must be uploaded to a ServerIron ADX to be compiled and bound to a SLB VIP port. In addition, several operations can be performed on the script and a profile can be defined that sets the environmental variables under which the script will run. The script must be uploaded to "usb0\sys\dpscript" on the ADX.

Followings are some frequently used operations:

Importing a script

ADX# copy tftp usb0 1.1.1.1 sample.pl usb0\sys\dpscript\sample.pl

Syntax: copy tftp usb0 <IP> <src name> usb0\sys\dpscript\<dest name>

Exporting a script

ADX# copy tftp usb0 1.1.1.1 sample.pl usb0\sys\dpscript\sample.pl
Syntax: copy usb0 tftp <IP> <src name> usb0\sys\dpscript\<dest name>

Renaming a script

ADX# rename usb0\sys\dpscript\sample.pl usb0\sys\dpscript\test1.pl

Display scripts

ADX# dir usb0\sys\dpscript
ADX# show script all

Compiling a script

ADX(config)# script compile sample.pl

Binding a script

ADX(config)# server virtual-name-or-ip vs1 100.1.5.101
ADX(config-vs-vs1)# port http script sample.pl

Updating an existing script

ADX(config)# script update sample.pl