Waiting for all jobs to finish

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have two target files that I use.

prod.target is used to start up all the production services.
When I use systemctl start prod.target it blocks until all the
services are running.

I also have prod-upgrade.target that is used to stop service
via Conflicts=. When I use systemctl start prod-upgrade.target
it returns immediately but there are stop jobs running.

I believe that this is expected as all the services that need to
be started have been.

Is there a systemctl command that will wait for all the stop jobs
without the need to poll for the systemctl list-jobs to be empty?

The pattern I'm implementing is to do this on a server upgrade:

systemctl start prod-upgrade.target
# need to wait for stop jobs to finish
dnf update --refresh -y
systemctl start prod.target

Barry




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux