aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application
diff options
context:
space:
mode:
authorZipeng WU <zipeng.wu@sonarsource.com>2023-08-30 14:49:07 +0200
committersonartech <sonartech@sonarsource.com>2023-08-30 20:03:07 +0000
commit6b2070bdc350a577f975ac2f39c2b121098fabcb (patch)
treed40a0290fbeb9c741be41b5837fc76629c184423 /sonar-application
parent51242baf5939629b757eb428e22cc78417f6b283 (diff)
downloadsonarqube-6b2070bdc350a577f975ac2f39c2b121098fabcb.tar.gz
sonarqube-6b2070bdc350a577f975ac2f39c2b121098fabcb.zip
SONAR-20310 Provide PIDDIR environment variable in the bootstrap script to allow customization
Diffstat (limited to 'sonar-application')
-rwxr-xr-xsonar-application/src/main/assembly/bin/linux-x86-64/sonar.sh5
-rwxr-xr-xsonar-application/src/main/assembly/bin/macosx-universal-64/sonar.sh5
2 files changed, 8 insertions, 2 deletions
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"