Unsupported content

 

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Additional authentication details - Running scripts from different places

This topic introduces you to basic authentication concepts and shows you how to run an NSH script from within an NSH Script Job. You can also run an NSH script from the CLI. For example, at the command prompt, type the following:

nsh MyScript

There are different authentication requirements for running a script from the CLI as compared to running a script from within an NSH Script Job:

  • When you run a script from the CLI, you need to populate the credentials cache and use the blcli_setoption command for roleName and serviceProfile.
  • When you run a script through an NSH Script Job, you do not need to set these, because they are passed down from the Application Server.

If you are writing a script that might be used both at the CLI and from within an NSH Script Job, you might add something like this to your script:


if \[ "$\{CLI_INTERACTIVE\}" != "false" \]
then
blcli_setoption roleName _myRole_
blcli_setoption serviceProfileName _myProfile_
fi

For information about the blcli_setoption command, see blcli_setoption.

Was this page helpful? Yes No Submitting... Thank you

Comments