Skip to content

Commit

Permalink
Fix to allow upgrade from 0.1.16 to 0.1.17
Browse files Browse the repository at this point in the history
-Conditionally stop WildFly if user account needs to be modified, since it cannot be modified with WildFly running
  • Loading branch information
bdwyertech committed Mar 16, 2015
1 parent a968032 commit ed33b16
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions recipes/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@
include_recipe 'apt' if platform?('ubuntu', 'debian')
include_recipe 'yum' if platform_family?('rhel')

# Create file to indicate user upgrade change (Applicable to 0.1.16 to 0.1.17 upgrade)
file ::File.join(wildfly['base'], '.chef_useracctchange') do
owner wildfly['user']
group wildfly['group']
action :create_if_missing
only_if { ::File.exist?(::File.join(wildfly['base'], '.chef_deployed')) && Dir.home('wildfly') != wildfly['base'] }
notifies :stop, "service[#{wildfly['service']}]", :immediately
end

# => Create Wildfly System User
user wildfly['user'] do
comment 'Wildfly System User'
Expand Down

0 comments on commit ed33b16

Please sign in to comment.