Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #127 from linc01n/home-path
Browse files Browse the repository at this point in the history
Set home path to 3.x default when it exists
  • Loading branch information
linc01n committed Dec 6, 2015
2 parents 272b259 + 5bd6528 commit 6206f63
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
default['stash']['version'] = '4.1.0'
default['stash']['product'] = Chef::Version.new(node['stash']['version']) >= Chef::Version.new('4.0.0') ? 'bitbucket' : 'stash'

default['stash']['home_path'] = "/var/atlassian/application-data/#{node['stash']['product']}"
if Dir.exist?('/var/atlassian/application-data/stash')
default['stash']['home_path'] = '/var/atlassian/application-data/stash'
else
default['stash']['home_path'] = "/var/atlassian/application-data/#{node['stash']['product']}"
end

default['stash']['install_path'] = '/opt/atlassian'
default['stash']['install_type'] = 'standalone'
default['stash']['service_type'] = 'init'
Expand Down
6 changes: 6 additions & 0 deletions recipes/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
action :create
recursive true
end

bash 'update home path permission' do
code <<-EOH
chown -R #{node['stash']['user']}:#{node['stash']['user']} #{node['stash']['home_path']}
EOH
end
else
config_path = '/stash-config.properties'
end
Expand Down

0 comments on commit 6206f63

Please sign in to comment.