X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/14634cdec2f8091b6b5a6197a6bee033ff530582..26a29f1e7f05beb3349fb54167fbb6465175697f:/cookbooks/otrs/recipes/default.rb?ds=sidebyside diff --git a/cookbooks/otrs/recipes/default.rb b/cookbooks/otrs/recipes/default.rb index c90b28940..0b810f428 100644 --- a/cookbooks/otrs/recipes/default.rb +++ b/cookbooks/otrs/recipes/default.rb @@ -79,11 +79,15 @@ file "/opt/otrs-#{version}/Kernel/Config.pm" do content config end +generic_agent = edit_file "/opt/otrs-#{version}/Kernel/Config/GenericAgent.pm.dist" do |line| + line +end + file "/opt/otrs-#{version}/Kernel/Config/GenericAgent.pm" do owner user group "www-data" mode 0664 - content IO.read("/opt/otrs-#{version}/Kernel/Config/GenericAgent.pm.dist") + content generic_agent end link "/opt/otrs" do @@ -95,7 +99,7 @@ execute "/opt/otrs/bin/otrs.SetPermissions.pl" do command "/opt/otrs/bin/otrs.SetPermissions.pl --otrs-user=#{user} --web-user=www-data --otrs-group=www-data --web-group=www-data /opt/otrs-#{version}" user "root" group "root" - not_if { File.stat("/opt/otrs/README.md").uid != Etc.getpwnam("otrs").uid } + only_if { File.stat("/opt/otrs/README.md").uid != Etc.getpwnam("otrs").uid } end execute "/opt/otrs/bin/otrs.RebuildConfig.pl" do