Details
Description
The Link resource creates a new symlink everytime chef-client is run. This is fine until I need to notify a service to restart when the link is created.
I can add a not_if to only run if the symlink exists however this doesn't account for when the destination for the symlink is different.
I have this work around:
link "/etc/pure-ftpd/auth/65unix" do
to "../conf/UnixAuthentication"
notifies :restart, resources(:service => "pure-ftpd")
- If the symlink exists and it points to the "TO" file then don't do anything
not_if do File.symlink?("#{name}") and File.readlink("#{name}") == to end
end
Scheduling this fix for 0.8