This command is used to modify a user-defined script that is registered with the Control Center. In order to use this command, you must know the ID of the script that you want to modify.
If you type edit userscripts
without any parameter in mtb_admin you will
initially be prompted for the sequence number (SEQNO). This is the number you get back
when you firstly create a userscript (i.e. add userscripts). You can also see this
number using show userscripts
command.
The SEQNO parameter is followed by all the other parameters. To change a parameter (e.g. LOCATION), type the new value when prompted and hit Enter. To keep a parameter unchanged, just press Enter at the prompt.
When you are done, you can review the modifications using show
userscripts
.
edit userscripts
command must be run from
the _control repository.Syntax
edit userscripts SEQNO <seqno> NAME "<display name>" DESCRIPTION "<description of script>" LOCATION "<full path>"
where,
SEQNO <seqno> |
The ID of the script that needs to be modified. This is the ID
that was returned when |
NAME"<display name>" |
Name of the script as you want it to appear in the Execute Server Action submenu in the Control Center. |
DESCRIPTION "<description>" |
Description of the user-defined script. |
LOCATION "<full path>" |
Location of the script, including filename. Use forward slashes to define the path. |
Optional Parameters
Parameter |
Description |
---|---|
SECURITY <1|0> |
Type |
FIXEDARGS <arg1 arg2> |
Arguments that are always passed to the script. You can use a
literal value as an argument or one of the following:
|
USERARGS <n> |
The number of arguments that need to be passed to the script by the user. The Control Center prompts only once for these arguments, and the user must respond with all the values, separated by a space. An individual argument cannot contain a space. |
edit userscripts
command must be run from the _control
repository. If the edit userscripts
command contains both FIXEDARGS
and USERARGS, the FIXEDARGS are passed to the script first.