Skip to content

Instantly share code, notes, and snippets.

@sbates
Created June 15, 2013 14:20
Show Gist options
  • Save sbates/5788306 to your computer and use it in GitHub Desktop.
Save sbates/5788306 to your computer and use it in GitHub Desktop.
bash "update_ssh" do
code <<-EOH
sed -i -e 's/AuthorizedKeysFile.*authorized_keys/AuthorizedKeysFile \\/\\.keys\\/%u\\/authorized_keys/g' /etc/ssh/sshd_config
EOH
end
bash "install_tomcat6" do
tomcat_version_name = "apache-tomcat-#{node.tomcat.version}"
tomcat_version_name_tgz = "#{tomcat_version_name}.tar.gz"
user "root"
code <<-EOH
curl --proxy https://aproxy.com:8080/ --user user:pass https://myartifactoryurl.com/artifactory/ext-release-local/apache-tomcat/apache-tomcat/#{node.tomcat.version}/#{tomcat_version_name_tgz} -o /tmp/#{tomcat_version_name_tgz}
tar -zxf /tmp/#{tomcat_version_name_tgz} -C /tmp
rm /tmp/#{tomcat_version_name_tgz}
mv /tmp/#{tomcat_version_name} #{node.tomcat.install_path}
chown -R #{node.tomcat.run_user}:#{node.tomcat.run_group} #{node.tomcat.install_path}
chmod -R 755 #{node.tomcat.install_path}
rm -rf #{node.tomcat.install_path}/webapps/ROOT
EOH
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment