Re: Generic interrupt command?

From: Roger Pate <rogerpate_at_gmail.com>
Date: Mon, 4 Feb 2019 23:15:59 -0500

On Mon, Feb 4, 2019 at 10:09 PM John O'Meara <john.fr.omeara_at_gmail.com> wrote:
> On Sat, Feb 2, 2019, 4:40 PM Steve Litt <slitt_at_troubleshooters.com> wrote:
>> On Sat, 2 Feb 2019 21:08:10 +0000 Colin Booth <colin_at_heliocat.net> wrote:
>>> s6-svstat -p /path/to/service | xargs kill SIGNAL
>>
>> Cool. That's all that's needed.
>
> Be careful, though. If the service is down, kill will use -1 for the PID,
> and will probably signal everything in your system except PID 1.

pid="$(s6-svstat -p /path/to/service)" && kill SIGNAL "$pid"
# avoid gratuitous xargs?
Received on Tue Feb 05 2019 - 04:15:59 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC