]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-20310 Provide PIDDIR environment variable in the bootstrap script to allow...
authorZipeng WU <zipeng.wu@sonarsource.com>
Wed, 30 Aug 2023 12:49:07 +0000 (14:49 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 30 Aug 2023 20:03:07 +0000 (20:03 +0000)
sonar-application/src/main/assembly/bin/linux-x86-64/sonar.sh
sonar-application/src/main/assembly/bin/macosx-universal-64/sonar.sh

index 41085b8ccac1e1cb4bd68edc2d66cdbf8038a57c..8f0408e1190172daf51562db3b73fb3f2dd2f8d6 100755 (executable)
@@ -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"
index abb9b0ca653fec4561ab5090763fce5f0c39d0d2..41040a0aa203aa58e106c820e912b26be440ac81 100755 (executable)
@@ -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"