You can also set an environment variable so that it only affects a particular program. Typically, this is done by adding the environment variable to the program™s sm_service command line. For example, if you want a Manager to use a particular serverConnect.conf file, you would specify the SM_SERVERCONNECT variable in the sm_service command line for that program.
The following example sets the value of the SM_SERVERCONNECT environment variable to point to the server_Connect_IP.conf file.
-
Use the sm_service show action with the --cmdline option to display the existing command line for the program. You must have administrative privileges when typing this command.
t BASEDIR/smarts /bin/sm_service show --cmdline ic-am-server s BASEDIR/smarts /bin/sm_service install --startmode=runonce ic-am-server BASEDIR/smarts /bin/sm_server --name=INCHARGE-AM --config=icf --bootstrap=bootstrap-am.conf --port=0 --ignore-restore-errors --output
-
Use the sm_service install action with the --force option to add the environment variable to the command line. The --env option specifies the environment variable.
t BASEDIR/smarts /bin/sm_service install --force --startmode=runonce --env=SM_SERVERCONNECT= BASEDIR/smarts /conf /serverConnect_IP.conf ic-am-server BASEDIR/smarts /bin/sm_server --name=INCHARGE-AM --config=icf --bootstrap=bootstrap-am.conf --port=0 --ignore-restore-errors --output s
-
Do one of the following:
-
Start the program.
-
Stop and restart the program.
-