4 ms·
But it accepts a list, so rather than write the loop: systemctl stop foo bar baz; systemctl start foo bar baz
by hueving 11y ago
But it accepts a list, so rather than write the loop:
systemctl stop foo bar baz; systemctl start foo bar baz
- vidarh 11y agoWith the caveat that yours and the version above are not the same. With properly written systemd units (e.g. using the notification API to signal when it's actually operational) the former will have fully started foo again before stopping bar (ignoring the lack of error handling in both examples..). Which may or may not matter.
- hueving 11y agoTrue. It's just that in most cases when I write a loop like that it's to work around the fact that the restart command didn't take a list, not because I need to serialize the service restarts.