Register a CGI script

The format of the <method> element for registering a CGI script is:

<method methodName="cgi.registerCGI">

Use this method to register a CGI script with the Web GUI server. The <method> element contains one or more <cgi> elements each defining a script to register.

<cgi>

The <cgi> element defines the characteristics of a CGI script and has the following attributes:

Table 1. Attributes of the <cgi> element
Attribute name Required or optional Description

name

Required

Provides a unique name for a CGI script.

Value: String

Default value: None

useSmartPageCommands

Optional

Defines whether to use SmartPage commands when running the script.

Value: true or false

Default value: false

fileName

Optional

The path name of the file that contains the script.

Value: String

Default value: If this attribute is omitted, the content of the <cgi> element contains the script.

Example

This example registers a script named myping contained in a file named nco_myping.cgi.

<methodCall>
	<method methodName="cgi.registerCGI">
		<cgi name="myping" acl="*" useSmartPageCommands="true"  
			fileName="/home/nco_myping.cgi">
		</cgi>
	</method>
</methodCall>