Add Xenial support

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

Change-Id: I0b42d4c510a163d71a4c1dd5912dc1fd25ea0717
This commit is contained in:
Colleen Murphy 2018-07-11 13:26:35 +02:00
parent d434fd93d0
commit c3c944a975
1 changed files with 9 additions and 0 deletions

View File

@ -44,6 +44,15 @@ class gerritbot(
source => 'puppet:///modules/gerritbot/gerritbot.init',
}
if versioncmp($::operatingsystemmajrelease, '16.04') >= 0 {
exec { 'gerritbot-systemd-daemon-reload':
command => '/bin/systemctl daemon-reload',
before => Service['gerritbot'],
subscribe => File['/etc/init.d/gerritbot'],
refreshonly => true,
}
}
service { 'gerritbot':
ensure => running,
enable => true,