Skip to content

Commit

Permalink
Bug Fix
Browse files Browse the repository at this point in the history
-Adjust logic to not fail if user is changed or does not exist
- Do not change the user after initial deployment... The permissions will be off!
  • Loading branch information
bdwyertech committed Mar 20, 2015
1 parent ed33b16 commit 534f640
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions recipes/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@

# 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'] }
action :touch
only_if { ::File.exist?(::File.join(wildfly['base'], '.chef_deployed')) && `getent passwd #{wildfly['user']} | cut -d: -f6`.chomp != wildfly['base'] }
notifies :stop, "service[#{wildfly['service']}]", :immediately
end

Expand Down

0 comments on commit 534f640

Please sign in to comment.