FYI, if you're running these commands from NSH, you'll want to use forward slashes, like /C/"Program Files"/BladeLogic/RSC/...
I've cut the section on secadmin from the BladeLogicAdministration.pdf and pasted it into the attached doc. You should hopefully find what you need in it, and probably more than you need, on top of that. :)
secadmin.doc 48.0 K
You aren't running this script via NSH or a script job are you? I'm guessing not as it seems that the net stop line would disable your access not allowing you to restart the service.
I've cut off my own access when mucking with sshd_config and restarting the daemon enough to be very weary of this type of thing.
Thanks for your help.
So is my syntax wrong for the stop/start of the RSCD agent bit then? If so, what the correct format?
For restarting the agent you can also use the full name as displayed in the Services MMC
net stop "BladeLogic RSCD Agent"
net start "BladeLogic RSCD Agent"
Yes, I wanted to the short service name to avoid using the long version, but thanks anyway.
I presume this syntax works ok in the post script section though?
If one of your postinstall commands is to stop the RSCD Agent on a target machine, this goes back to what M. Mraz was saying earlier - you will effectively cut off your communication with the server on which you are running the command and, therefore, will not be able to restart the service.
Is this what you are doing or am I thinking of something else?
We need to use a different port for our BL traffic so thats why we are running the commands to change the port.
PS. /c/program..../secadmin.. doesn't work with post install scripts on Windows provisioning packages. I changed it to DOS syntax and it works fine.
Pauline, you're thinking of something else. The post install script in a system package is not executed through the agent. It is executed in the OS.
This is why the NSH path format doesn't work.
Frank, try using 8.3 paths
FYI, In order to restart the agent remotely, I have had some success with writing out a .bat file with the NET STOP and START commands and then calling that .bat file.
I think because the agent restarts within the connection timeout, you don't lose control of the agent...
Another thought that I'm kicking myself for not remembering initially...
For controlling the RSCD agent via scripted process and via the appserver, you should look into the agentctl command. This is used to control the agent status remotely.
From NSH, type 'man agentctl'.
Right, I have an update for you folks.
I've successfully set my post-install script so the port is changed upon provision completion and the RSCD Daemon is restarted so the changes take effect. Please find correct syntax below:
*C:\Progra1\BladeL1\RSC\secadmin -m rscd -r 1111 -
C:\Progra1\BladeL1\RSC\secadmin -m default -r 1111 -
net stop RSCDsvc
net start RSCDsvc*
As Robin Spinks had suggested to me off thread (cheers Rob), the syntax for the DOS
needed to be in DOS 8.3 format or else it will fail.
My only outstanding issue focuses around why my post batch job fails to run...
..not really sure which order the provisioning executes the different steps you see. If the post install scripts follow the post batch job then the chances are this wouldn't work as my port number won't have changed by that point. Can anyone offer some more advice on this?
Is it worth capturing this by logging a call?
The order is:
- Install agent
- Run post-install script
- Execute batch job
mmm, so why is my post install batch job failing.... it works ok if i run it manually.