From cff207aed7839bad385e590ef00559eebec14f02 Mon Sep 17 00:00:00 2001 From: Joshua Rogers Date: Wed, 1 Nov 2017 08:27:06 -0500 Subject: [PATCH] Fixes bug where init script checks for existence of the wrong file on 10.4. --- cookbooks/arcgis-enterprise/providers/server.rb | 9 ++++++++- .../arcgis-enterprise/templates/default/arcgisserver.erb | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cookbooks/arcgis-enterprise/providers/server.rb b/cookbooks/arcgis-enterprise/providers/server.rb index 483ecc1..28f4a9c 100644 --- a/cookbooks/arcgis-enterprise/providers/server.rb +++ b/cookbooks/arcgis-enterprise/providers/server.rb @@ -665,7 +665,14 @@ if node['init_package'] == 'init' arcgisserver_path = '/etc/init.d/arcgisserver' service_file = 'arcgisserver.erb' - template_variables = ({ :agshome => agshome }) + + if node['arcgis']['version'].start_with? '10.4' + properties_file = 'arcgis-server-framework.properties' + else + properties_file = 'arcgis-framework.properties' + end + + template_variables = ({ :agshome => agshome, :agsproperties => properties_file }) # Systemd else node['init_package'] == 'systemd' arcgisserver_path = '/etc/systemd/system/arcgisserver.service' diff --git a/cookbooks/arcgis-enterprise/templates/default/arcgisserver.erb b/cookbooks/arcgis-enterprise/templates/default/arcgisserver.erb index e4df96e..baf78be 100644 --- a/cookbooks/arcgis-enterprise/templates/default/arcgisserver.erb +++ b/cookbooks/arcgis-enterprise/templates/default/arcgisserver.erb @@ -10,7 +10,7 @@ ### END INIT INFO invoker=`id | cut -f 2 -d '(' | cut -f 1 -d ')'` -agsfilecheck=framework/etc/arcgis-framework.properties +agsfilecheck=framework/etc/<%=@agsproperties%> rwd=`dirname $0`/../../.. if [ -L "$0" ]; then