Skip to content

Commit

Permalink
Merge pull request #9 from charlesconnell/onreboot
Browse files Browse the repository at this point in the history
Add capability to specify onreboot mode
  • Loading branch information
PaulFurtado authored Sep 25, 2020
2 parents c58aa7e + 811514e commit ef72bb3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
19 changes: 10 additions & 9 deletions manifests/monitor.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@
#
define monit::monitor (
$pidfile,
$ensure = present,
$ip_port = 0,
$socket = undef,
$checks = [ ],
$start_script = "/etc/init.d/${name} start",
$stop_script = "/etc/init.d/${name} stop",
$start_timeout = undef,
$stop_timeout = undef,
$group = $name,
$ensure = present,
$ip_port = 0,
$socket = undef,
$checks = [ ],
$start_script = "/etc/init.d/${name} start",
$stop_script = "/etc/init.d/${name} stop",
$start_timeout = undef,
$stop_timeout = undef,
$on_reboot_mode = undef,
$group = $name,
) {
include monit::params

Expand Down
3 changes: 3 additions & 0 deletions templates/process.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ check process <%= @name %> with pidfile <%= @pidfile %>
<% if @stop_timeout -%>
with timeout <%= @stop_timeout %> seconds
<% end -%>
<% if @on_reboot_mode -%>
onreboot <%= @on_reboot_mode %>
<% end -%>
<% if @ip_port.to_i > 0 -%>
if failed port <%= @ip_port %> then restart
<% elsif @socket -%>
Expand Down

0 comments on commit ef72bb3

Please sign in to comment.