[RTFACT-15012] Fix installService.sh to support SUSE Linux Enterprise Server Created: 27/Sep/17  Updated: 21/Feb/18  Resolved: 28/Jan/18

Status: Resolved
Project: Artifactory Binary Repository
Component/s: None
Affects Version/s: 5.5.1
Fix Version/s: 5.9.0

Type: Bug Priority: Normal
Reporter: Angello Maggio Assignee: Sagiv Levi
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS: SUSE Linux Enterprise Server


Regression:
Yes
Support Tickets:

SAP Bulgaria - Support Case, Ariba (SAP) - Support Case, Teradata SD - Support Case

Product Comments: 18-Dec-17: Need the DevOps team to provide a fix for the script.
Assigned QA: Dudi Morad (Inactive)
Internal Documentation: docRelNotes
Total No. Tickets (90 days): 1

 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


Generated at Mon Dec 16 11:43:32 UTC 2019 using JIRA 7.6.16#76018-sha1:9ed376192612a49536ac834c64177a0fed6290f5.