We want to create a custom action in which the following happens:
Pre-Execution Action Script: A service gets stopped.
Some fixlets get pushed.
The machine gets rebooted.
Post-Execution Action Script: The aforementioned service gets started.
The automatic-reboot is easy, and that’s working. However, I’m not getting my service to stop/start as planned. I currently just have the following simple BigFix Action Script: “dos net stop servicename” (without quotes, where servicename is modified to reflect one of our actual service names). The post-execution script is the same, except it uses start instead of stop. Any ideas on getting the service to stop/start.
We don’t want the service to start automatically every time the computer starts, so the service start-mode is set to Manual. Granted, we DO want it to start automatically in this particular case, but not always.
I think my problem is w/ the actual service name, so I will try editing that.
Are you trying to stop and then start the action in the same action script?
You could always drop some sort of flag in the registry to indicate your process has run and when it ran. Set your service to automatic temporarily and then when the machine restarts, the service will start.
Then you have a monitor action clean up your flag in the registry and set the service back to manual. The relevance would be exists flag and and maybe uptime <= (now - flag time)
Ben, I’ve tried to add some Bigfix tasks into a baseline, but it’s still not working entirely. Here is what I’ve done now. In a baseline, I’ve added the following items, in this order:
Stop Service*
2 thru 48. (several June fixlets)
Restart Computers*
Start Service*
These are Bigfix tasks, and these are their actual names.
When I run this baseline, everything works EXCEPT the “Restart Computers”. It never happens; the machines stay running, and they show as “Pending Restart”. However, the “Start Service” task works fine, so it’s as if it just skips right over the Restart step.
Now, I’ve got it working. Instead of using the “Restart Computers” task, I created my own task w/ that contained the code “restart 60”. That works. I found that on this thread…