I have the following upstart job which takes arguments to run multiple instances of the same job:
instance $ARG1,$ARG2
script
exec /path/to/executable "$ARG1" "ARG2"
end script
Now if I start two instances of my job like this:
$ start my-job ARG1=ABCD ARG2=1
my-job (ABCD,1) start/running, process 6242
$ start my-job ARG1=EFGH ARG2=2
my-job (EFGH,2) start/running, process 6254
How do I stop all instances of my-job
in one command, short of doing a grep on initctl list
, extracting the parameters of running instances of my-job
and doing a stop
on each of the instances.
I've tried stop my-job
and stop my-job ARG1=\* ARG2=\*
. Both don't work.