Remove the init script shipped by the heka package
This prevents to restart all collectors by side effect when '/etc/init.d/heka stop' is run. Change-Id: I4f743e765e5895f3c97505a166140bcd80f7ce34 Partial-bug: #1570850
This commit is contained in:
parent
fd9337b43b
commit
89882ae849
|
@ -152,7 +152,9 @@ define heka (
|
|||
|
||||
if $::osfamily == 'Debian' {
|
||||
# Starting from Heka 0.10.0, the Debian package provides a SysV init
|
||||
# script so we need to stop the service and disable it.
|
||||
# script so we need to stop the service and remove the init script.
|
||||
# If this script isn't removed, the user may accidentally stop *all* the
|
||||
# running hekad processes by invoking '/etc/init.d/heka stop'.
|
||||
exec { 'stop_heka_daemon':
|
||||
command => '/etc/init.d/heka stop',
|
||||
onlyif => '/usr/bin/test -f /etc/init.d/heka',
|
||||
|
@ -163,6 +165,12 @@ define heka (
|
|||
exec { 'disable_heka_daemon':
|
||||
command => '/usr/sbin/update-rc.d heka disable',
|
||||
refreshonly => true,
|
||||
notify => Exec['remove_heka_service'],
|
||||
}
|
||||
|
||||
exec { 'remove_heka_service':
|
||||
command => '/bin/rm -f /etc/init.d/heka',
|
||||
refreshonly => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue