Commit 40b35c11 authored by mh's avatar mh
Browse files

fix wrong template usage

parent 21bab6e7
......@@ -218,25 +218,25 @@
<% unless scope.scope.lookupvar('monit::alert') == 'absent' -%>
set alert <%= scope.scope.lookupvar('monit::alert') %>
<% unless scope.lookupvar('monit::alert') == 'absent' -%>
set alert <%= scope.lookupvar('monit::alert') %>
<% end %>
<% unless monit::mailserver == 'absent' -%>
set mailserver <%= scope.scope.lookupvar('monit::mailserver') %>
set mailserver <%= scope.lookupvar('monit::mailserver') %>
<% end -%>
<% if scope.scope.lookupvar('monit::enable_httpd') == 'yes' -%>
set httpd port <%= scope.scope.lookupvar('monit::httpd_port') %> and use address localhost
<% if scope.lookupvar('monit::enable_httpd') == 'yes' -%>
set httpd port <%= scope.lookupvar('monit::httpd_port') %> and use address localhost
allow localhost
<%
require 'digest/sha1'
s=scope.scope.lookupvar('monit::secret')
s=scope.lookupvar('monit::secret')
-%>
allow monit:<%= Digest::SHA1.hexdigest(s + Digest::SHA1.hexdigest(s + fqdn)) %>
<% end -%>
# set daemon mode timeout to 1 minute
set daemon <%= scope.scope.lookupvar('monit::pool_interval') %>
set daemon <%= scope.lookupvar('monit::pool_interval') %>
# Include all files from /etc/monit.d/
include /etc/monit.d/*
\ No newline at end of file
......@@ -3,25 +3,25 @@
# This file is handled by puppet, any local changes will be lost
#
<% unless scope.scope.lookupvar('monit::alert') == 'absent' -%>
set alert <%= scope.scope.lookupvar('monit::alert') %>
<% unless scope.lookupvar('monit::alert') == 'absent' -%>
set alert <%= scope.lookupvar('monit::alert') %>
<% end %>
<% unless monit::mailserver == 'absent' -%>
set mailserver <%= scope.scope.lookupvar('monit::mailserver') %>
set mailserver <%= scope.lookupvar('monit::mailserver') %>
<% end -%>
<% if scope.scope.lookupvar('monit::enable_httpd') == 'yes' -%>
set httpd port <%= scope.scope.lookupvar('monit::httpd_port') %> and use address localhost
<% if scope.lookupvar('monit::enable_httpd') == 'yes' -%>
set httpd port <%= scope.lookupvar('monit::httpd_port') %> and use address localhost
allow localhost
<%
require 'digest/sha1'
s=scope.scope.lookupvar('monit::secret')
s=scope.lookupvar('monit::secret')
-%>
allow monit:<%= Digest::SHA1.hexdigest(s + Digest::SHA1.hexdigest(s + fqdn)) %>
<% end -%>
set daemon <%= scope.scope.lookupvar('monit::pool_interval') %>
set daemon <%= scope.lookupvar('monit::pool_interval') %>
set logfile syslog facility log_daemon
# Include settings from other files
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment