aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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"