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 forroleName
andserviceProfile
. - 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.
Comments
Log in or register to comment.