Add support for Xenial

Add an exec to trigger a systemd reload so that the existing SysV init
script just works.

Change-Id: Ieb7e701579e74ca62622880ed8ec2b857d98b60a
This commit is contained in:
Colleen Murphy 2018-07-10 16:53:25 +02:00
parent 9b032cffba
commit 4b617e0229
1 changed files with 9 additions and 0 deletions

View File

@ -97,6 +97,15 @@ class elastic_recheck::bot (
content => template('elastic_recheck/elastic-recheck.init.erb'),
}
if versioncmp($::operatingsystemmajrelease, '16.04') >= 0 {
exec { 'elastic-recheck-systemd-daemon-reload':
command => '/bin/systemctl daemon-reload',
before => Service['elastic-recheck'],
subscribe => File['/etc/init.d/elastic-recheck'],
refreshonly => true,
}
}
service { 'elastic-recheck':
ensure => running,
enable => true,