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