Running A Cli Script From The Web Interface - D-Link NetDefendOS User Manual

Network security firewall
Hide thumbs Also See for NetDefendOS:
Table of Contents

Advertisement

COMPortDevice
Ethernet
EthernetDevice
Device
These node types are skipped when the script file is created and NetDefendOS gives the
message No objects of selected category or type.
Tip: Listing created script commands on the console
To list the created CLI commands on the console instead of saving them to a file, leave
out the option -name= in the script -create command.
Commenting in Script Files
Any line in a script file that begins with the # character is treated as a comment. For example:
# The following line defines the If1 IP address
add IP4Address If1_ip Address=10.6.60.10
Scripts Running Other Scripts
It is possible for one script to run another script. For example, the script my_script.sgs could
contain the line:
script -execute -name my_script2.sgs
NetDefendOS allows the script file my_script2.sgs to execute another script file and so on. The
maximum depth of this script nesting is 5.
Running Scripts from the Web Interface
It is possible to upload and execute a CLI script through the Web Interface. Following execution
of the script, it is not retained in memory.
The script does not need to have a filetype of .sgs for this feature to be used. Any filetype is
acceptable.
Example 2.9. Running a CLI Script from the Web Interface
In this example, a CLI script called my_script.sgs on local disk storage is uploaded and executed
through the Web Interface.
Web Interface
1.
Go to: Status > Maintenance > Import Script
2.
Select Browse and choose the script file my_script.sgs
Chapter 2: Management and Maintenance
63

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents