Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12231

/etc/init.d/solr problem

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 7.3
    • None
    • scripts and tools
    • None
    • Centos 7.4 

      java-1.8.0-openjdk

    Description

      I noticed that there are a couple of minor issues with the init.d script in pretty much every version. 

      Basically, a semicolon (or an escaped semicolon) is missing in the BLUE lines blow:

       

      if [ -n "$RUNAS" ]; then
      su -c "SOLR_INCLUDE=\"$SOLR_ENV\" \"$SOLR_INSTALL_DIR/bin/solr\" $SOLR_CMD" - "$RUNAS"
      else
      SOLR_INCLUDE="$SOLR_ENV" "$SOLR_INSTALL_DIR/bin/solr" "$SOLR_CMD"
      fi

       

      With the added semicolons (escaped where necessary), the code would look like: 

      if [ -n "$RUNAS" ]; then
      su -c "SOLR_INCLUDE=\"$SOLR_ENV\"\; \"$SOLR_INSTALL_DIR/bin/solr\" $SOLR_CMD" - "$RUNAS"*
      else
      *SOLR_INCLUDE="$SOLR_ENV"; "$SOLR_INSTALL_DIR/bin/solr" "$SOLR_CMD"
      fi

       

      Attachments

        Activity

          People

            sarowe Steven Rowe
            guitarscape Lihua Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: