diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2015-04-14 09:43:47 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2015-04-15 15:03:45 +0200 |
commit | cc128313041970270db4797fea797863c80f07ff (patch) | |
tree | 0f9f762acfefa04200631cc43739d39d7fc3cc8a /start.sh | |
parent | 19094a0c94d551e59466274ce5115e192dfd264a (diff) | |
download | sonarqube-cc128313041970270db4797fea797863c80f07ff.tar.gz sonarqube-cc128313041970270db4797fea797863c80f07ff.zip |
add -d option to start.sh to remote debug web server
Diffstat (limited to 'start.sh')
-rwxr-xr-x | start.sh | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1,9 +1,14 @@ #!/bin/bash +############################### +# usage: use -d option to enable remote debugging of the web server on port 5005 +############################### if [[ "$OSTYPE" == "darwin"* ]]; then OS='macosx-universal-64' + SED_DISABLE_BACKUP=" ''" else OS='linux-x86-64' + SED_DISABLE_BACKUP="" fi ls sonar-application/target/sonarqube-*.zip 1> /dev/null 2>&1 @@ -18,6 +23,14 @@ if [ "$?" != "0" ]; then unzip sonarqube-*.zip fi cd sonarqube-* + +if [ "$1" = "-d" ]; then + echo "enabling debug in conf/sonar.properties, listening on port 5005" + sed -i $SED_DISABLE_BACKUP '/javaAdditionalOpts/d' conf/sonar.properties + echo "" >> conf/sonar.properties + echo "sonar.web.javaAdditionalOpts=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" >> conf/sonar.properties +fi + bin/$OS/sonar.sh restart sleep 1 tail -100f logs/sonar.log |