---
recipes/aeolus/manifests/iwhd.pp | 8 +++++++-
recipes/aeolus/templates/iwhd-users.js | 1 +
recipes/aeolus/templates/iwhd.init | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
create mode 100644 recipes/aeolus/templates/iwhd-users.js
diff --git a/recipes/aeolus/manifests/iwhd.pp b/recipes/aeolus/manifests/iwhd.pp
index de0209b..2ceb03e 100644
--- a/recipes/aeolus/manifests/iwhd.pp
+++ b/recipes/aeolus/manifests/iwhd.pp
@@ -35,6 +35,11 @@ class aeolus::iwhd inherits aeolus {
mode => 755,
require => Package['iwhd'] }
+ file {"/etc/iwhd/users.js":
+ content => template("aeolus/iwhd-users.js"),
+ mode => 755,
+ require => Package['iwhd'] }
+
service { 'mongod':
ensure => 'running',
enable => true,
@@ -46,7 +51,8 @@ class aeolus::iwhd inherits aeolus {
hasstatus => true,
require => [Service[mongod],
File['/var/lib/iwhd',
- '/etc/init.d/iwhd']]}
+ '/etc/init.d/iwhd',
+ '/etc/iwhd/users.js']]}
# XXX ugly hack but iwhd might take some time to come up
exec{"iwhd_startup_pause":
diff --git a/recipes/aeolus/templates/iwhd-users.js
b/recipes/aeolus/templates/iwhd-users.js
new file mode 100644
index 0000000..236a22e
--- /dev/null
+++ b/recipes/aeolus/templates/iwhd-users.js
@@ -0,0 +1 @@
+[ { "name":"<%= iwhd_oauth_user %>",
"secret":"<%= iwhd_oauth_password %>" } ]
diff --git a/recipes/aeolus/templates/iwhd.init b/recipes/aeolus/templates/iwhd.init
index 12617a0..1247801 100755
--- a/recipes/aeolus/templates/iwhd.init
+++ b/recipes/aeolus/templates/iwhd.init
@@ -83,7 +83,7 @@ start() {
echo
printf %s $"Starting $SERVICE daemon: "
- $PROCESS -c "$CONFIG_JS" $IWHD_ARGS -o -U <%= iwhd_oauth_user
%>:<%= iwhd_oauth_password %>&
+ $PROCESS -c "$CONFIG_JS" $IWHD_ARGS -o -u /etc/iwhd/users.js &
pid=$!
RETVAL=$?
if test $RETVAL = 0; then
--
1.7.6.4
Show replies by date