NSHScript - addNSHScriptToExternalRepo


NSHScript - addNSHScriptToExternalRepo

Description :

This command adds an NSH script to the Git repository.

This command returns the DBKey of the NSH script object.

The scriptType argument specifies the run method for the NSH script. You can enter any of the following values:

  • 1 - execute once passing a host list as a parameter
  • 2 - execute on each host (runscript)
  • 3 - execute using Perl interpreter
  • 4 - copy and nexec

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

groupID

Integer

Group ID of depot group.

scriptType

Integer

Value representing the run method for the NSH script. See above for a more complete description.

fileLocation

String

Full NSH-style path to the script being added to the repository.

name

String

Display name of the NSH script.

description

String

Display description of the NSH script.

Example

The following example shows how to add a runscript type NSH script (that is, scriptType=2) to the external Git repository.

Script

SCRIPTPATH=//scripthost/c/tmp/reboot.nsh

NSHSCRIPT=reboot

DESCRIPTION="reboot utility"

GROUP_ID=`blcli DepotGroup groupNameToId /group1`

SCRIPT_KEY=`blcli NSHScript addNSHScriptToExternalRepo $GROUP_ID 2 $SCRIPTPATH $NSHSCRIPT "$DESCRIPTION"`

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*