diff --git a/chef/cookbooks/metasploitable/files/sinatra/start.sh b/chef/cookbooks/metasploitable/files/sinatra/start.sh new file mode 100644 index 0000000..45226cb --- /dev/null +++ b/chef/cookbooks/metasploitable/files/sinatra/start.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +cd /opt/sinatra +bundle install +ruby ./server.rb diff --git a/chef/cookbooks/metasploitable/recipes/sinatra.rb b/chef/cookbooks/metasploitable/recipes/sinatra.rb index 4548cfe..72098d2 100644 --- a/chef/cookbooks/metasploitable/recipes/sinatra.rb +++ b/chef/cookbooks/metasploitable/recipes/sinatra.rb @@ -20,7 +20,7 @@ directory '/opt/sinatra' do mode '0777' end -['Gemfile', 'README.txt', 'check.rb', 'poc.rb', 'start.conf', 'server.rb'].each do |fname| +['Gemfile', 'README.txt', 'check.rb', 'poc.rb', 'start.sh', 'server.rb'].each do |fname| cookbook_file "/opt/sinatra/#{fname}" do source "sinatra/#{fname}" mode '0777'