From b2d92968049ebecf7bcd1de822beb8da9ca436d3 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Thu, 10 Jan 2013 19:19:14 -0800 Subject: [PATCH] Factor out event propagation. --- upstart/harold-relay.conf | 12 ++++++++++++ upstart/harold-startup.conf | 6 +----- 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 upstart/harold-relay.conf diff --git a/upstart/harold-relay.conf b/upstart/harold-relay.conf new file mode 100644 index 0000000..f766238 --- /dev/null +++ b/upstart/harold-relay.conf @@ -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 diff --git a/upstart/harold-startup.conf b/upstart/harold-startup.conf index a82a54e..dbb2fc8 100644 --- a/upstart/harold-startup.conf +++ b/upstart/harold-startup.conf @@ -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