#!/bin/sh

#
# This file was generated by Chef for <%= node['fqdn'] %>.
# Do NOT modify this file by hand.
#

exec 2>&1
cd <%= @options[:new_resource].remote_fs %>
exec chpst -u <%= @options[:new_resource].user %> \
  <%= @options[:java_bin] %> \
<%- if @options[:new_resource].jvm_options -%>
  <%= @options[:new_resource].jvm_options %> \
<%- end -%>
  -jar <%= @options[:slave_jar] %> \
<%- if @options[:jnlp_secret] -%>
  -secret <%= @options[:jnlp_secret] %> \
<%- end -%>
  -jnlpUrl <%= @options[:jnlp_url] %>

#!/bin/sh

#
# This file was generated by Chef for <%= node['fqdn'] %>.
# Do NOT modify this file by hand.
#

exec 2>&1
cd <%= @options[:new_resource].remote_fs %>
exec chpst -u <%= @options[:new_resource].user %> \
  env HOME=<%= @options[:new_resource].remote_fs %> \
  JENKINS_HOME=<%= @options[:new_resource].remote_fs %> \
  <%= @options[:java_bin] %> \
<%- if @options[:new_resource].jvm_options -%>
  <%= @options[:new_resource].jvm_options %> \
<%- end -%>
  -jar <%= @options[:slave_jar] %> \
<%- if @options[:jnlp_secret] -%>
  -secret <%= @options[:jnlp_secret] %> \
<%- end -%>
  -jnlpUrl <%= @options[:jnlp_url] %>

Set HOME and JENKINS_HOME on slaves
Set HOME and JENKINS_HOME on slaves
