mirror of
https://github.com/rapid7/metasploitable3.git
synced 2024-07-05 11:12:25 +02:00
- Turns out it was supposed to be the loader file, not server - Bump version for aws to 0.1.8 - This is RC1 for the UNITED CTF. Will launch with this version if no issues are found.
46 lines
819 B
Ruby
46 lines
819 B
Ruby
#
|
|
# Cookbook:: metasploitable
|
|
# Recipe:: sinatra
|
|
#
|
|
# Copyright:: 2017, Rapid7, All Rights Reserved.
|
|
#
|
|
#
|
|
|
|
include_recipe 'metasploitable::sinatra'
|
|
include_recipe 'metasploitable::ruby23'
|
|
|
|
server_path = node['ec2'] ? 'aws' : 'virtualbox'
|
|
|
|
directory '/opt/sinatra' do
|
|
mode '0777'
|
|
end
|
|
|
|
directory '/var/opt/sinatra' do
|
|
mode '0777'
|
|
end
|
|
|
|
cookbook_file '/opt/sinatra/Gemfile' do
|
|
source 'sinatra/Gemfile'
|
|
mode '0777'
|
|
end
|
|
|
|
cookbook_file '/opt/sinatra/server' do
|
|
source "sinatra/#{server_path}/loader"
|
|
mode '0777'
|
|
end
|
|
|
|
cookbook_file '/opt/sinatra/.server' do
|
|
source 'sinatra/server'
|
|
mode '0777'
|
|
end
|
|
|
|
cookbook_file '/etc/init/sinatra.conf' do
|
|
source 'sinatra/sinatra.conf'
|
|
mode '0777'
|
|
end
|
|
|
|
service 'sinatra' do
|
|
supports restart: false, start: true, reload: false, status: false
|
|
action [:enable, :start]
|
|
end
|