#
# Cookbook Name:: fateca
# Recipe:: default
#
# Copyright 2014, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
application "fateca" do
    path node['fateca']['path']
    owner node['fateca']['owner']
    group node['fateca']['group']
    repository node['fateca']['repository']
    revision node['fateca']['revision']
    enable_submodules node['fateca']['submodules']
    

    # Forces deploy
    if node['fateca']['force_deploy'] == true
        action :force_deploy
    end

    # Enables virtual hosting
    mod_php_apache2 do
        webapp_template "fateca.conf.erb"
    end
end
#
# Cookbook Name:: fateca
# Recipe:: default
#
# Copyright 2014, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
application "fateca" do
    path node['fateca']['path']
    owner node['fateca']['owner']
    group node['fateca']['group']
    repository node['fateca']['repository']
    revision node['fateca']['revision']
    enable_submodules node['fateca']['submodules']
    

    # Forces deploy
    if node['fateca']['force_deploy'] == true
        action :force_deploy
    end

    # Enables virtual hosting
    mod_php_apache2 do
        webapp_template "fateca.conf.erb"
    end

    after_restart do
        # Add env variables
        magic_shell_environment 'PATH' do
          value "$PATH:#{new_resource.path}/current/app/Console"
        end

        # Changes cake console permission
        file "#{new_resource.path}/current/app/Console/cake" do
          mode '777'
        end
    end
end
Add cake console command to the path
Add cake console command to the path
