Created
August 26, 2010 14:21
-
-
Save kyleburton/551473 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', '..','lib','our_chef')) | |
node[:our_config] ||= {} | |
node[:our_config][:jvm_opts] ||= {} | |
node[:our_config][:jvm_opts][:max_heap] ||= "256m" | |
bash "create user servicerunner" do | |
user "root" | |
code <<-EOF | |
useradd -s /bin/bash -m servicerunner | |
EOF | |
not_if "test -d /home/servicerunner" | |
end | |
%w( /var/lib/the-clj-service/shared | |
/var/lib/the-clj-service/releases | |
/var/log/the-clj-service ).each do |dir| | |
directory dir do | |
owner "servicerunner" | |
group "servicerunner" | |
mode "0755" | |
action :create | |
recursive true | |
not_if "test -d #{dir}" | |
end | |
end | |
template "/var/lib/the-clj-service/the-clj-service.sh" do | |
source "the-clj-service.sh" | |
owner "servicerunner" | |
group "servicerunner" | |
mode "0755" | |
end | |
template "/etc/init.d/the-clj-serviced" do | |
source "the-clj-serviced.init" | |
owner "root" | |
group "root" | |
mode "0755" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment