- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
10-28-2021 05:47 AM
Hi Team,
I have created a script to automate some configuration with bash, its failing to install contents as downloading job not finished yet, what command can be used to wait until job finish?
11-03-2021 05:37 AM
Hi @Srikant, when you initiate the content download, you would need to wait for the download to finish, by observing the "job ID" of the download. Here is an example, the download command gives the job ID (875), then in your script you would need to watch the job status until it moves from status:ACT (active) to status:FIN (finished), check that result was "OK", then proceed to do the install...
admin@james-vm-series-a(active)> request content upgrade download sync-to-peer no force yes latest
Download job enqueued with jobid 875
875
admin@james-vm-series-a(active)> show jobs id 875
Enqueued Dequeued ID Type Status Result Completed
------------------------------------------------------------------------------------------------------------------------------
2021/11/03 12:32:49 12:32:49 875 Downld ACT PEND 99%
Warnings:
Details:
admin@james-vm-series-a(active)> show jobs id 875
Enqueued Dequeued ID Type Status Result Completed
------------------------------------------------------------------------------------------------------------------------------
2021/11/03 12:32:49 12:32:49 875 Downld FIN OK 12:32:51
Warnings:
Details:File successfully downloaded
Hope this helps
01-27-2022 05:12 AM
Hi Jimmy,
Thanks for explanation
Actually i am running all commands with script, manually we can wait and trigger but want to automate all the stuff.
anyone knows best option to download and install using scrip
Thanks
02-03-2022 09:08 AM
There is a ready-made playbook in Ansible here if you are interested, from a repository of other really useful Ansible playbooks.
That said, in bash, it might look something like this script?
$ ./content_install.sh
Download status: ACT
Download status: FIN
Install status: ACT
Install status: ACT
Install status: ACT
Install status: ACT
Install status: ACT
Install status: ACT
Install status: ACT
Install status: FIN
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!