Permalink
Browse files

Solr won't start if the log directory is missing.

  • Loading branch information...
rbramley committed Mar 27, 2012
1 parent d1c4f45 commit 77c1dcbbf58caf6e8de197af44d66d53905c527b
Showing with 6 additions and 0 deletions.
  1. +6 −0 scripts/StartSolr.groovy
View
@@ -35,6 +35,12 @@ def solrHost = "localhost"
target ( startsolr: "Start Solr Jetty Instance") {
depends("stopsolr")
depends("init")
+
+ // check for log directory existence - create or Solr won't start
+ def solrLogDir = "${solrHome}/logs"
+ if(! new File(solrLogDir)?.exists()) {
+ Ant.mkdir(dir: "${solrLogDir}")
+ }
// overlay the schema.xml config file in the apps grails-app/conf/solr directory (and other conf files)
Ant.copy(todir:"${solrHome}/solr/conf", failonerror: false) {

0 comments on commit 77c1dcb

Please sign in to comment.