Date: 01/07
Affected NV Version: 7.4.x
OS Version: ALL
Plugin version: N/A
Application version: N/A
Description:
User Parameter usage in Pre/Post Scripts
Procedure:
Whatever is input in the "User Parameter" field is passed to the script itself via an Environmental Variable known as “NV_USER_ARG"
When creating your script, if you would like NetVault to pass a "User Parameter" to it, your script would need to be set up to receive NV_USER_ARG as a variable.
For example, in the psmail script that is included in the default NetVault installation, you would have this:
NV_HOME/util/psformat | $NV_HOME/util/nvsendmail -f - -s "Job '$NV_JOBTITLE': $NV_STATUS" -d $NV_USER_ARG
In the "User Parameter" field, you would enter your e-mail address and then that is passed to the script where it is looking for NV_USER_ARG.
You need to be signed in and under a current maintenance contract to view premium knowledge articles.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center