X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=utils%2Fjenkins-jnlp-connect.sh;h=9ef4298efeca34ef6f49bbe9bb0b44a7fe372fd3;hb=31524f49baa376c3fa227eb4d67138035e60789b;hp=8dcaf35c51eb69ac7c010fc86ad96191c7cd32f9;hpb=bee6e516f14eb1178630585e89e5dedd81135694;p=releng.git diff --git a/utils/jenkins-jnlp-connect.sh b/utils/jenkins-jnlp-connect.sh index 8dcaf35c5..9ef4298ef 100755 --- a/utils/jenkins-jnlp-connect.sh +++ b/utils/jenkins-jnlp-connect.sh @@ -38,6 +38,11 @@ main () { exit 1 fi + if [[ $(pwd) != "$jenkinshome" ]]; then + echo "This script needs to be run from the jenkins users home dir" + exit 1 + fi + if [[ -z $slave_name || -z $slave_secret ]]; then echo "slave name or secret not defined, please edit this file to define it" exit 1 @@ -146,6 +151,7 @@ fi usage() { cat << EOF +**this file must be copied to the jenkins home directory to work** jenkins-jnlp-connect.sh configures monit to keep slave connection up Checks for new versions of slave.jar run as root to create pid directory and create monit config.