D-Link DFL-260-IPS-12 Product Manual - Page 43
Script Output, Saving Scripts, script -execute -name=my_script2.sgs -verbose
View all D-Link DFL-260-IPS-12 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 43 highlights
2.1.5. CLI Scripts Chapter 2. Management and Maintenance If an executing CLI script file encounters an error condition, the default behavior is for the script to terminate. This behavior can be overridden by using the -force option. To run a script file called my_script2.sgs in this way, the CLI command is: gw-world:/> script -execute -name=my_script2.sgs -force If -force is used, the script will continue to execute even if errors are returned by a command in the script file. Script Output Any output from script execution will appear at the CLI console. Normally this output only consists of any error messages that occur during execution. To see the confirmation of each command completing, the -verbose option should be used: gw-world:/> script -execute -name=my_script2.sgs -verbose Saving Scripts When a script file is uploaded to the NetDefend Firewall, it is initially kept only in temporary RAM memory. If NetDefendOS restarts then any uploaded scripts will be lost from this volatile memory and must be uploaded again to run. To store a script between restarts, it must explicitly be moved to non-volatile NetDefendOS disk memory by using the script -store command. To move the example my_script.sgs to non-volatile memory the command would be: gw-world:/> script -store -name=my_script.sgs Alternatively, all scripts can be moved to non-volatile memory with the command: gw-world:/> script -store -all Removing Scripts To remove a saved script. the script -remove command can be used. To remove the example my_script.sgs script file, the command would be: gw-world:/> script -remove -name=my_script.sgs Listing Scripts The script on its own, command without any parameters, lists all the scripts currently available and indicates the size of each script as well as the type of memory where it resides (residence in non-volatile memory is indicated by the word "Disk" in the Memory column). gw-world:/> script Name my_script.sgs my_script2.sgs Storage -----------RAM Disk Size (bytes 8 10 To list the content of a specific uploaded script file, for example my_script.sgs the command would be: 43