Merge "Upload Generated Documentation to Correct Path"
[releng.git] / utils / jenkins-jnlp-connect.sh
index 8dcaf35..9ef4298 100755 (executable)
@@ -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.