This was my solution - found after some hacking around plus the tip from @Draco-ater...
Where the recipe referenced directory("/etc/service/pyramid/supervise/status")
, the status 'directory' is a file that already exists which was causing issues.
In addition, the script also tried to update the control
and ok
pipes as directories - which was also failing. I solved this by using bash
and chmod
:
bash "give_perms_pyramid" do
user "chef"
cwd "#{node['runit']['service_dir']}/pyramid#{dir}/supervise"
code <<-EOH
sudo chown myuser:root control
sudo chmod g+rw control
EOH
Maybe that will help someone.