Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rberger/404349 to your computer and use it in GitHub Desktop.
Save rberger/404349 to your computer and use it in GitHub Desktop.
Created the file /etc/init/test.conf with the following contents:
(The behavior is the same if I use $A instead of ${A})
-------- Start of test.conf -----
start on (start_foo A=*)
stop on (stop_foo A=*)
instance ${A}
script
logger -i -t test "Starting A: $A"
exec yes
end script
-------- End of test.conf -----
Then when I start two instances, each one with a different instance variable "A"
and then stop one using a specific KEY, it stops both instances. I would have expected only the one with the specified key that matches a specific instance would be stopped:
# initctl emit start_foo A=hello
# initctl list | grep test
test (hello) start/running, process 17432
# initctl emit start_foo A=goodby
# initctl list | grep test
test (hello) start/running, process 17432
test (goodby) start/running, process 17438
# initctl emit stop_foo A=goodby
# initctl list | grep test
test stop/waiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment