From 977b334690d53cbbfb3c38026ae66eafbfb83117 Mon Sep 17 00:00:00 2001 From: Anthony Young Date: Tue, 15 Nov 2011 13:30:20 -0800 Subject: [PATCH] user must configure a jenkins ssh key --- tools/jenkins/jenkins_home/build_jenkins.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/jenkins/jenkins_home/build_jenkins.sh b/tools/jenkins/jenkins_home/build_jenkins.sh index d60679b..e0e774e 100755 --- a/tools/jenkins/jenkins_home/build_jenkins.sh +++ b/tools/jenkins/jenkins_home/build_jenkins.sh @@ -10,13 +10,6 @@ if [[ $EUID -ne 0 ]]; then exit 1 fi -# Make sure user has configured an ssh pubkey -if [ ! -e /root/.ssh/id_rsa.pub ]; then - echo "Public key is missing. This is used to ssh into your instances." - echo "Please run ssh-keygen before proceeding" - exit 1 -fi - # This directory CUR_DIR=$(cd $(dirname "$0") && pwd) @@ -42,6 +35,13 @@ if [ ! -e /var/lib/jenkins ]; then exit 1 fi +# Make sure user has configured a jenkins ssh pubkey +if [ ! -e /var/lib/jenkins/.ssh/id_rsa.pub ]; then + echo "Public key for jenkins is missing. This is used to ssh into your instances." + echo "Please run "su -c ssh-keygen jenkins" before proceeding" + exit 1 +fi + # Setup sudo JENKINS_SUDO=/etc/sudoers.d/jenkins cat > $JENKINS_SUDO <