Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-15012

Fix installService.sh to support SUSE Linux Enterprise Server

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.5.1
    • Fix Version/s: 5.9.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      OS: SUSE Linux Enterprise Server

    • Regression:
      Yes

      Description

      The checkRoot part throws an error, because the systemd on SLES is located at "/usr/lib/systemd/system".
      Tested on SUSE Linux Enterprise 12 SP3

      Customer recommends to change this from the following.

      checkRoot

      artBinDir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
      artExtractDir="$(cd "$(dirname "$artBinDir")" && pwd)"

      [ -n "$ARTIFACTORY_HOME" ] || ARTIFACTORY_HOME="$artExtractDir"
      [ -n "$artEtcDir" ] || artEtcDir="/etc/opt/jfrog/artifactory"
      TOMCAT_HOME="$ARTIFACTORY_HOME/tomcat"
      artLogDir="$ARTIFACTORY_HOME/logs"
      artRunDir="$ARTIFACTORY_HOME/run"
      [ -n "$artInitdFile" ] || artInitdFile="/etc/init.d/artifactory"

      if [ -z "$artSystemdFile" ]; then
      UNAME=$(uname | tr "[:upper:]" "[:lower:]")
      if [ "$UNAME" == "linux" ]; then
      artSystemdFile="/etc/systemd/system/artifactory.service"
      else
      artSystemdFile="/usr/lib/systemd/system/artifactory.service"
      fi
      fi

      • To the following (Note the green parts). *

      checkRoot

      artBinDir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
      artExtractDir="$(cd "$(dirname "$artBinDir")" && pwd)"

      [ -n "$ARTIFACTORY_HOME" ] || ARTIFACTORY_HOME="$artExtractDir"
      [ -n "$artEtcDir" ] || artEtcDir="/etc/opt/jfrog/artifactory"
      TOMCAT_HOME="$ARTIFACTORY_HOME/tomcat"
      artLogDir="$ARTIFACTORY_HOME/logs"
      artRunDir="$ARTIFACTORY_HOME/run"
      [ -n "$artInitdFile" ] || artInitdFile="/etc/init.d/artifactory"

      if [ -z "$artSystemdFile" ]; then

      SUSE=$(cat /etc/issue | grep -io suse)
      NOSUSE=$(echo $SUSE | tr "[:upper:]" "[:lower:]")

      UNAME=$(uname | tr "[:upper:]" "[:lower:]")
      if [ "$UNAME" == "linux" ]
      && [ "$NOSUSE" != "suse" ]; then
      artSystemdFile="/etc/systemd/system/artifactory.service"
      else
      artSystemdFile="/usr/lib/systemd/system/artifactory.service"
      fi
      fi

        Attachments

          Activity

            People

            • Assignee:
              sagivl Sagiv Levi
              Reporter:
              angellom Angello Maggio
              Assigned QA:
              Dudi Morad
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: