I want to kill all instances of a systemd service.
This works fine: sudo systemctl stop 'custom-service@*'
but it is slow since it runs my custom ExecStop
which does extra work to safely shut down the process.
In certain cases, I'd rather just kill the processes. I tried to do it this way
sudo systemctl kill -s SIGKILL 'custom-service@*'
however, this doesn't kill anything.
If I modify this to a specific instance it works fine and the instance gets killed.
e.g. sudo systemctl kill -s SIGKILL 'custom-service@someinstance-1.service'
but I'd rather not do that for each one.
Have I missed something?