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
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"
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
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"