2017-04-17 18:45:23 +02:00
|
|
|
#
|
2017-04-17 20:28:07 +02:00
|
|
|
# Cookbook:: chatbot
|
|
|
|
# Recipe:: chatbot
|
2017-04-17 18:45:23 +02:00
|
|
|
#
|
|
|
|
# Copyright:: 2017, Rapid7, All Rights Reserved.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
2017-04-17 20:28:07 +02:00
|
|
|
include_recipe 'metasploitable::chatbot'
|
2017-04-17 18:45:23 +02:00
|
|
|
|
|
|
|
package 'unzip'
|
|
|
|
|
|
|
|
package 'npm'
|
|
|
|
|
|
|
|
package 'bundler'
|
|
|
|
|
|
|
|
cookbook_file '/tmp/chatbot.zip' do
|
|
|
|
source 'chatbot/chatbot.zip'
|
|
|
|
mode '0777'
|
|
|
|
end
|
|
|
|
|
|
|
|
execute 'unzip chatbot' do
|
|
|
|
command 'unzip /tmp/chatbot.zip -d /opt'
|
|
|
|
end
|
|
|
|
|
|
|
|
execute 'chown chatbot' do
|
|
|
|
command 'chown -R vagrant:vagrant /opt/chatbot'
|
|
|
|
end
|
|
|
|
|
|
|
|
execute 'chmod chatbot' do
|
|
|
|
command 'chmod -R 777 /opt/chatbot'
|
|
|
|
end
|
|
|
|
|
|
|
|
execute 'install chatbot' do
|
|
|
|
command '/opt/chatbot/install.sh'
|
|
|
|
end
|
|
|
|
|
|
|
|
service 'chatbot' do
|
|
|
|
supports restart: false, start: true, reload: false, status: false
|
|
|
|
action [:enable, :start]
|
|
|
|
end
|