Ludovic Courtès <l...@gnu.org> writes:

> Hi,
>
> Tomas Volf <~@wolfsden.cz> skribis:
>
>> I guess it could be special-cased for start, stop, restart, since these
>> three do not take (by default) any arguments (I *think* you can make
>> `start' procedure taking arguments?  I have never tried.).  But for
>> general case, the `service2' is passed as an argument to the action
>> `restart' of service `service1'.
>
> I think we could special-case that on the client side (in ‘herd’) with
> something like:
>
>   herd restart --batch s1 s2 s3
>
> which would restart those services one after the other.
>
> WDYT?

Oh, that could work, nice.  Maybe a little bit more generic?

--8<---------------cut here---------------start------------->8---
herd ACTION --batch s1 s2 s3 [-- args...]
--8<---------------cut here---------------end--------------->8---

Technically that prevents the user from batch-restarting service called
`--', but I would not be surprised if there would be some issues with
that already, so ¯\_(ツ)_/¯.

The default actions (restart, ...) still should probably signal an error
if they get arguments, people (me included) will forget the --batch from
time to time.

>
> Ludo’.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

Attachment: signature.asc
Description: PGP signature

Reply via email to