Client Automation Standard Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

RPS.CFG update using Radia

Highlighted
Abhayraj Bhasme
Super Collector

RPS.CFG update using Radia

Hi,
I want to update rps.cfg file. To take changes effect in rps.cfg, it requires to restart the httpdproxy services. I have created ZSERVICE with BUPDATE to stop the service & trying to start the services using ZCREATE or ZINIT but i am failing to start the services. parameters used to stop the service is (BUPDATE NATIVE CMD /C "sc stop httpdproxy ") similar way if i want to start httpdproxy services i am using ZCREATE or ZINIT using NATIVE CMD /C "sc start httpdproxy ", but failing to do so. Can any body help on this.
5 REPLIES
Roy O Gatewood_
Honored Contributor

Re: RPS.CFG update using Radia

ZINIT runs before ZCREATE which is run when the object is placed. Both only run at Service activation.
BUPDATE on runs if a Service is updated.
So what is your situation? Is this a Service install/activation or an update?
Abhayraj Bhasme
Super Collector

Re: RPS.CFG update using Radia

I Have packed rps.cfg file using componont selection mode & deploying using radia, so it is installation. After installation i need to restart httpdproxy services. How to acheive this? Please guide me on this.
Roy O Gatewood_
Honored Contributor

Re: RPS.CFG update using Radia

Use ZINIT to stop the service.
Try using an AutoRun (EXECUTE)instance to start it backup.

Re: RPS.CFG update using Radia

Another option is to create a script and include with the rps.cfg, modifying it to go to %TEMP% or the such. Then, all you need is a single ZCREATE that initiates the script.

This also allows for adding a check to verify the service has stopped and later for it to have restarted.

For example, using nvdkit and batch script, you could use something like this (in this case, start and verify start of service):

REM attempt to start service
nvdkit.exec service start httpdproxy
REM wait 10 seconds for service to start
sleep 10
REM check if service started
nvdkit.exe service query httpdproxy | findstr /c:"o(status)" | findstr /c:"started" 1>NUL 2>NUL
if ERRORLEVEL 1 goto :startfailed
REM service started ok
goto :startok
:startfailed
REM here is where you would take appropriate action if start failed.
:startok
REM done!
exit
Robert Ball_1
Regular Collector

Re: RPS.CFG update using Radia

Hi there,

It sounds like this method should be present on the ZSERVICE.ZUPDATE, as long as the new cfg file is present in the package.

The EXECUTE class works well too, but be careful - EXECUTE commands are executed asynchronously - the radia connect won't wait for it to complete and return a result code on failure etc.
//Add this to "OnDomLoad" event