Install `go-mmproxy`.
This commit is contained in:
parent
294c24b89a
commit
49b4326aa1
|
@ -9,4 +9,10 @@ node.reverse_merge!({
|
|||
'storage' => '/opt/gitea/',
|
||||
'location' => '/usr/local/bin/'
|
||||
},
|
||||
'go-mmproxy' => {
|
||||
'url' => 'https://github.com/path-network/go-mmproxy/releases/',
|
||||
'bin_url' => 'https://github.com/path-network/go-mmproxy/releases/download/2.0/go-mmproxy-2.0-centos8-x86_64',
|
||||
'storage' => '/opt/go-mmproxy/',
|
||||
'location' => '/usr/local/bin/'
|
||||
},
|
||||
})
|
||||
|
|
|
@ -3,6 +3,8 @@ include_recipe './attributes.rb'
|
|||
|
||||
# Install:
|
||||
include_recipe './install.rb'
|
||||
include_recipe './install-go-mmproxy.rb'
|
||||
|
||||
# Setup:
|
||||
include_recipe './setup.rb'
|
||||
include_recipe './setup-go-mmproxy.rb'
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
# Download:
|
||||
TMP = "/tmp/go-mmproxy"
|
||||
|
||||
execute "wget #{node['go-mmproxy']['bin_url']} -O #{TMP}" do
|
||||
not_if "test -e #{node['go-mmproxy']['storage']}/go-mmproxy"
|
||||
end
|
||||
|
||||
# Install:
|
||||
directory node['go-mmproxy']['storage'] do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode '755'
|
||||
end
|
||||
|
||||
execute "mv #{TMP} #{node['go-mmproxy']['storage']}/go-mmproxy" do
|
||||
not_if "test -e #{node['go-mmproxy']['storage']}/go-mmproxy"
|
||||
end
|
||||
|
||||
# Change Owner and Permissions:
|
||||
file "#{node['go-mmproxy']['storage']}/go-mmproxy" do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode '755'
|
||||
end
|
||||
|
||||
# Create Link
|
||||
link "#{node['go-mmproxy']['location']}/go-mmproxy" do
|
||||
to "#{node['go-mmproxy']['storage']}/go-mmproxy"
|
||||
end
|
Loading…
Reference in New Issue