Run daemon-reload after installing log processor init script
Now that we are upgrading to Xenial, we need to take into account that we're running with systemd and reload it so that it picks up the new service. Change-Id: Id02ac2bc51132a8d8d4a77cb05d41fa902765b28
This commit is contained in:
parent
54eb1a0785
commit
b87b76f27c
@ -41,6 +41,17 @@ define log_processor::worker (
|
||||
],
|
||||
}
|
||||
|
||||
if ($::operatingsystem == 'Ubuntu') and ($::operatingsystemrelease >= '16.04') {
|
||||
# This is a hack to make sure that systemd is aware of the new service
|
||||
# before we attempt to start it.
|
||||
exec { "jenkins-log-worker${suffix}-systemd-daemon-reload":
|
||||
command => '/bin/systemctl daemon-reload',
|
||||
before => Service["jenkins-log-worker${suffix}"],
|
||||
subscribe => File["/etc/init.d/jenkins-log-worker${suffix}"],
|
||||
refreshonly => true,
|
||||
}
|
||||
}
|
||||
|
||||
service { "jenkins-log-worker${suffix}":
|
||||
enable => true,
|
||||
hasrestart => true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user