From: Zipeng WU Date: Wed, 30 Aug 2023 12:49:07 +0000 (+0200) Subject: SONAR-20310 Provide PIDDIR environment variable in the bootstrap script to allow... X-Git-Tag: 10.2.0.77647~25 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6b2070bdc350a577f975ac2f39c2b121098fabcb;p=sonarqube.git SONAR-20310 Provide PIDDIR environment variable in the bootstrap script to allow customization --- diff --git a/sonar-application/src/main/assembly/bin/linux-x86-64/sonar.sh b/sonar-application/src/main/assembly/bin/linux-x86-64/sonar.sh index 41085b8ccac..8f0408e1190 100755 --- a/sonar-application/src/main/assembly/bin/linux-x86-64/sonar.sh +++ b/sonar-application/src/main/assembly/bin/linux-x86-64/sonar.sh @@ -2,6 +2,9 @@ APP_NAME="SonarQube" +# Location of the pid file. +PIDDIR="${PIDDIR-.}" + # By default, java from the PATH is used, except if SONAR_JAVA_PATH env variable is set findjava() { if [ -z "${SONAR_JAVA_PATH}" ]; then @@ -86,7 +89,7 @@ XMX="-Xmx32m" COMMAND_LINE="$JAVA_CMD $XMS $XMX $HAZELCAST_ADDITIONAL -jar $LIB_DIR/sonar-application-@sqversion@.jar" # Location of the pid file. -PIDFILE="./$APP_NAME.pid" +PIDFILE="$PIDDIR/$APP_NAME.pid" # Resolve the location of the 'ps' command PSEXE="/usr/bin/ps" diff --git a/sonar-application/src/main/assembly/bin/macosx-universal-64/sonar.sh b/sonar-application/src/main/assembly/bin/macosx-universal-64/sonar.sh index abb9b0ca653..41040a0aa20 100755 --- a/sonar-application/src/main/assembly/bin/macosx-universal-64/sonar.sh +++ b/sonar-application/src/main/assembly/bin/macosx-universal-64/sonar.sh @@ -2,6 +2,9 @@ APP_NAME="SonarQube" +# Location of the pid file. +PIDDIR="${PIDDIR-.}" + # By default, java from the PATH is used, except if SONAR_JAVA_PATH env variable is set findjava() { if [ -z "${SONAR_JAVA_PATH}" ]; then @@ -86,7 +89,7 @@ XMX="-Xmx32m" COMMAND_LINE="$JAVA_CMD $XMS $XMX $HAZELCAST_ADDITIONAL -jar $LIB_DIR/sonar-application-@sqversion@.jar" # Location of the pid file. -PIDFILE="./$APP_NAME.pid" +PIDFILE="$PIDDIR/$APP_NAME.pid" # Resolve the location of the 'ps' command PSEXE="/usr/bin/ps"