Skip to content

Commit

Permalink
Merge pull request #352 from willejs/symlink-executable
Browse files Browse the repository at this point in the history
symlink /usr/local/bin/consul to the install location
  • Loading branch information
johnbellone authored Oct 5, 2016
2 parents 966dadf + 82af287 commit 07b70c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/consul_installation_binary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ def action_create
source_properties checksum: options[:archive_checksum]
not_if { ::File.exist?(consul_program) }
end

link '/usr/local/bin/consul' do
to ::File.join(options[:extract_to], new_resource.version, 'consul')
end
end
end

Expand Down
4 changes: 4 additions & 0 deletions test/integration/default/serverspec/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
it { should be_grouped_into 'consul' }
it { should be_mode 755 }
end

describe file('/usr/local/bin/consul') do
it { should be_symlink }
end
end

if windows?
Expand Down

0 comments on commit 07b70c9

Please sign in to comment.