Stop trying to start gerrit every time
We only want to start it when we've installed or upgraded. The initial-init and init are designed to either one of them run, one if there is no init script (initial install) the other if there is (upgrade). The things they trigger should only run in response to those actions. Change-Id: I3bcaaed07bcf6239e053789b9b6241cbf652e7d4
This commit is contained in:
parent
9c650cc731
commit
566e936d98
@ -512,12 +512,14 @@ class gerrit(
|
||||
user => 'gerrit2',
|
||||
command => '/usr/bin/java -jar /home/gerrit2/review_site/bin/gerrit.war init -d /home/gerrit2/review_site --batch --no-auto-start',
|
||||
subscribe => File['/home/gerrit2/review_site/bin/gerrit.war'],
|
||||
refreshonly => true,
|
||||
require => [Package['openjdk-7-jre-headless'],
|
||||
User['gerrit2'],
|
||||
Mysql::Db['reviewdb'],
|
||||
File['/home/gerrit2/review_site/etc/gerrit.config'],
|
||||
File['/home/gerrit2/review_site/etc/secure.config']],
|
||||
notify => Exec['install-core-plugins'],
|
||||
unless => '/usr/bin/test -f /etc/init.d/gerrit',
|
||||
logoutput => true,
|
||||
}
|
||||
|
||||
@ -536,6 +538,7 @@ class gerrit(
|
||||
File['/home/gerrit2/review_site/etc/gerrit.config'],
|
||||
File['/home/gerrit2/review_site/etc/secure.config']],
|
||||
notify => Exec['install-core-plugins'],
|
||||
onlyif => '/usr/bin/test -f /etc/init.d/gerrit',
|
||||
logoutput => true,
|
||||
}
|
||||
|
||||
@ -547,7 +550,7 @@ class gerrit(
|
||||
require => [Package['unzip'],
|
||||
File['/home/gerrit2/review_site/plugins']],
|
||||
notify => Exec['gerrit-start'],
|
||||
unless => '/usr/bin/test -f /etc/init.d/gerrit',
|
||||
refreshonly => true,
|
||||
logoutput => true,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user