diff options
author | 2016-11-29 12:46:47 +0000 | |
---|---|---|
committer | 2016-11-29 13:43:58 +0000 | |
commit | eec298409634c4826ec73be18829810f16e208f4 (patch) | |
tree | 56d7d8d9285113076f5d9511e1964a4a69cd1d63 /utils/jenkins-jnlp-connect.sh | |
parent | 58e754eb9afa05c9bb6c90da1f1a6882b3e866cd (diff) |
utils: jenkins-jnlp-connect.sh: Fix 'started_monit' block indentation
Change-Id: Id2eb5f63944e73a764e6a0f950f9147c6d6c8d88
Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'utils/jenkins-jnlp-connect.sh')
-rwxr-xr-x | utils/jenkins-jnlp-connect.sh | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/utils/jenkins-jnlp-connect.sh b/utils/jenkins-jnlp-connect.sh index 8337684ec..9751a90de 100755 --- a/utils/jenkins-jnlp-connect.sh +++ b/utils/jenkins-jnlp-connect.sh @@ -116,33 +116,33 @@ stop program = \"/bin/bash -c '/bin/kill \$(/bin/cat /var/run/$jenkinsuser/jenki fi fi -if [[ $started_monit == "true" ]]; then - wget --timestamping https://build.opnfv.org/ci/jnlpJars/slave.jar && true - chown $jenkinsuser:$jenkinsuser slave.jar - - if [[ -f /var/run/$jenkinsuser/jenkins_jnlp_pid ]]; then - echo "pid file found" - if ! kill -0 "$(/bin/cat /var/run/$jenkinsuser/jenkins_jnlp_pid)"; then - echo "no java process running cleaning up pid file" - rm -f /var/run/$jenkinsuser/jenkins_jnlp_pid; - else - echo "java connection process found and running already running quitting." - exit 1 + if [[ $started_monit == "true" ]]; then + wget --timestamping https://build.opnfv.org/ci/jnlpJars/slave.jar && true + chown $jenkinsuser:$jenkinsuser slave.jar + + if [[ -f /var/run/$jenkinsuser/jenkins_jnlp_pid ]]; then + echo "pid file found" + if ! kill -0 "$(/bin/cat /var/run/$jenkinsuser/jenkins_jnlp_pid)"; then + echo "no java process running cleaning up pid file" + rm -f /var/run/$jenkinsuser/jenkins_jnlp_pid; + else + echo "java connection process found and running already running quitting." + exit 1 + fi fi - fi - if [[ $run_in_foreground == true ]]; then - $connectionstring + if [[ $run_in_foreground == true ]]; then + $connectionstring + else + exec $connectionstring & + echo $! > /var/run/$jenkinsuser/jenkins_jnlp_pid + fi else - exec $connectionstring & - echo $! > /var/run/$jenkinsuser/jenkins_jnlp_pid + echo "you are ready to start monit" + echo "eg: service monit start" + echo "example debug mode if you are having problems: /usr/bin/monit -Ivv -c /etc/monit.conf " + exit 0 fi -else - echo "you are ready to start monit" - echo "eg: service monit start" - echo "example debug mode if you are having problems: /usr/bin/monit -Ivv -c /etc/monit.conf " - exit 0 -fi } usage() { |