solr: Dependency fixes for service startup

This commit is contained in:
Ossi Salmi 2013-08-26 16:52:45 +03:00
parent 53d6ac4bf2
commit 663e36dfc4
2 changed files with 10 additions and 3 deletions

View file

@ -39,7 +39,7 @@ fi
start_solr() { start_solr() {
# Check to see if Solr is running # Check to see if Solr is running
pgrep -u $SOLRUSER -f start.jar >/dev/null pgrep -u ${SOLRUSER} -f start.jar >/dev/null
RUNNING=$? RUNNING=$?
if [ $RUNNING -eq 0 ]; then if [ $RUNNING -eq 0 ]; then
echo "[FAILED]" echo "[FAILED]"

View file

@ -84,31 +84,37 @@ class solr {
ensure => link, ensure => link,
target => "/usr/local/share/solr/example/start.jar", target => "/usr/local/share/solr/example/start.jar",
require => File["/srv/solr/run"], require => File["/srv/solr/run"],
before => Service["solr"],
} }
file { "/srv/solr/run/contexts": file { "/srv/solr/run/contexts":
ensure => link, ensure => link,
target => "/usr/local/share/solr/example/contexts", target => "/usr/local/share/solr/example/contexts",
require => File["/srv/solr/run"], require => File["/srv/solr/run"],
before => Service["solr"],
} }
file { "/srv/solr/run/etc": file { "/srv/solr/run/etc":
ensure => link, ensure => link,
target => "/usr/local/share/solr/example/etc", target => "/usr/local/share/solr/example/etc",
require => File["/srv/solr/run"], require => File["/srv/solr/run"],
before => Service["solr"],
} }
file { "/srv/solr/run/lib": file { "/srv/solr/run/lib":
ensure => link, ensure => link,
target => "/usr/local/share/solr/example/lib", target => "/usr/local/share/solr/example/lib",
require => File["/srv/solr/run"], require => File["/srv/solr/run"],
before => Service["solr"],
} }
file { "/srv/solr/run/resources": file { "/srv/solr/run/resources":
ensure => link, ensure => link,
target => "/usr/local/share/solr/example/resources", target => "/usr/local/share/solr/example/resources",
require => File["/srv/solr/run"], require => File["/srv/solr/run"],
before => Service["solr"],
} }
file { "/srv/solr/run/webapps": file { "/srv/solr/run/webapps":
ensure => link, ensure => link,
target => "/usr/local/share/solr/example/webapps", target => "/usr/local/share/solr/example/webapps",
require => File["/srv/solr/run"], require => File["/srv/solr/run"],
before => Service["solr"],
} }
file { "/etc/init.d/solr": file { "/etc/init.d/solr":
@ -131,8 +137,9 @@ class solr {
} }
service { "solr": service { "solr":
ensure => running, ensure => running,
enable => true, enable => true,
hasstatus => true,
} }
file { "/etc/solr": file { "/etc/solr":