Permalink
Browse files

Factor out event propagation.

  • Loading branch information...
1 parent 3c1bea2 commit b2d92968049ebecf7bcd1de822beb8da9ca436d3 @spladug committed Jan 11, 2013
Showing with 13 additions and 5 deletions.
  1. +12 −0 upstart/harold-relay.conf
  2. +1 −5 upstart/harold-startup.conf
View
@@ -0,0 +1,12 @@
+description "propagate harold-action events to all harold instances"
+
+task
+start on harold-action
+
+script
+ for filename in /opt/harold/etc/*.ini; do
+ base=$(basename "$filename")
+ name=${base%.*}
+ initctl $ACTION --no-wait harold name=$name
+ done
+end script
@@ -4,9 +4,5 @@ task
start on runlevel [2345]
script
- for filename in /opt/harold/etc/*.ini; do
- base=$(basename "$filename")
- name=${base%.*}
- start --no-wait harold name=$name
- done
+ initctl emit harold-action ACTION=start
end script

0 comments on commit b2d9296

Please sign in to comment.