Skip to content

Commit

Permalink
@ all variables and some empty character removal
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchilds committed Dec 20, 2013
1 parent 4fff870 commit f53cf90
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions templates/jenkins-slave.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ LOCK_FILE=/var/lock/jenkins-slave

slave_start() {
echo Starting Jenkins Slave...
runuser - <%= slave_user -%> -c 'java -jar <%= slave_home -%>/<%= client_jar -%> <%= ui_user_flag -%> <%= ui_pass_flag -%> -name <%= fqdn -%> -executors <%= executors -%> <%= masterurl_flag -%> <%= labels_flag -%> &'
pgrep -f -u <%= slave_user -%> <%= client_jar -%> > $PID_FILE
runuser - <%= @slave_user -%> -c 'java -jar <%= @slave_home -%>/<%= @client_jar -%> <%= ui_user_flag -%> <%= @ui_pass_flag -%> -name <%= @fqdn -%> -executors <%= @executors -%> <%= masterurl_flag -%> <%= @labels_flag -%> &'
pgrep -f -u <%= @slave_user -%> <%= @client_jar -%> > $PID_FILE
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $LOCK_FILE
}
slave_stop() {
echo Stopping Jenkins Slave...
pid=`cat $PID_FILE`

killproc -p $PID_FILE
killproc -p $PID_FILE

# Wait until the monitor exits
while (checkpid $pid)
do
usleep 100000
done

RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f $LOCK_FILE
}
Expand All @@ -40,7 +40,7 @@ slave_restart() {
echo Restarting Jenkins Slave...
slave_stop
slave_start

RETVAL=$?
[ $RETVAL -eq 0 ] && touch $LOCK_FILE
}
Expand Down

0 comments on commit f53cf90

Please sign in to comment.