Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

moving config data to attributes

  • Loading branch information...
commit ff5ecae2229dcb10be78c4581d303af43599a0c3 1 parent 166cb45
Ulf Harnhammar authored
Showing with 14 additions and 8 deletions.
  1. +7 −0 monit/attributes/default.rb
  2. +7 −8 monit/recipes/collectwork.rb
View
7 monit/attributes/default.rb
@@ -0,0 +1,7 @@
+default["monit"]["collectwork"]["pid_file"] = "/var/run/collectwork/collectwork.pid"
+default["monit"]["collectwork"]["pid_dir"] = "/var/run/collectwork"
+default["monit"]["collectwork"]["name"] = "collectwork"
+default["monit"]["collectwork"]["start_script"] = "/etc/init.d/collectwork"
+default["monit"]["collectwork"]["helper_script"] = "/usr/local/bin/collectwork"
+default["monit"]["collectwork"]["user"] = "www-data"
+default["monit"]["collectwork"]["command"] = "/srv/www/ebim2/current/bin/ebim2 cron-collect-work"
View
15 monit/recipes/collectwork.rb
@@ -1,14 +1,13 @@
# installs the monitrc for our collectwork processes
include_recipe "monit::service"
-# configure me
-thepidfile="/var/run/collectwork/collectwork.pid"
-thepiddir="/var/run/collectwork"
-thename="collectwork"
-thestartscript="/etc/init.d/collectwork"
-thehelperscript="/usr/local/bin/collectwork"
-theuser="www-data"
-thecmd="/srv/www/ebim2/current/bin/ebim2 cron-collect-work"
+thepidfile=node["monit"]["collectwork"]["pid_file"]
+thepiddir=node["monit"]["collectwork"]["pid_dir"]
+thename=node["monit"]["collectwork"]["name"]
+thestartscript=node["monit"]["collectwork"]["start_script"]
+thehelperscript=node["monit"]["collectwork"]["helper_script"]
+theuser=node["monit"]["collectwork"]["user"]
+thecmd=node["monit"]["collectwork"]["command"]
template thestartscript do
source "collectwork.init.erb"
Please sign in to comment.
Something went wrong with that request. Please try again.