summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAric Gardner <agardner@linuxfoundation.org>2015-11-03 19:20:53 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-11-03 19:20:53 +0000
commitaaa51c715f9fd4237078aa3fa8eb285d7a39ce3e (patch)
tree98a2dea623a7dc5cdb699d77222d13be69e64ff5
parentb24f2e0c5b39e24f7d34a2de46b9442b836b239c (diff)
parenta4ccfe9afb559571728680a79b3fbaa4260e407f (diff)
Merge "Small fixes to ownership, test mode."
-rwxr-xr-xutils/jenkins-jnlp-connect.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/utils/jenkins-jnlp-connect.sh b/utils/jenkins-jnlp-connect.sh
index d048859c2..03e47b8b2 100755
--- a/utils/jenkins-jnlp-connect.sh
+++ b/utils/jenkins-jnlp-connect.sh
@@ -100,6 +100,7 @@ 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"
@@ -113,9 +114,12 @@ then echo "pid file found"
fi
fi
-exec $connectionstring &
-echo $! > /var/run/$jenkinsuser/jenkins_jnlp_pid
-#trap 'rm -f "$pidfile"; exit' EXIT SIGQUIT SIGINT SIGSTOP SIGTERM
+if [[ run_in_foreground == true ]]; then
+ $connectionstring
+else
+ exec $connectionstring &
+ echo $! > /var/run/$jenkinsuser/jenkins_jnlp_pid
+fi
else
echo "you are ready to start monit"
@@ -165,7 +169,8 @@ do
s ) slave_secret="$OPTARG";;
h ) usage; exit;;
t ) started_monit=true
- skip_monit=true ;;
+ skip_monit=true
+ run_in_foreground=true ;;
f ) test_firewall ;;
\? ) echo "Unknown option: -$OPTARG" >&2; exit 1;;
esac