shell - How to check if the directory is symlink in chef -


i want delete directory if not symlnik.

directory "/var/www/html/"   action :delete   only_if ??? end 

the selected answer not work on windows or systems bash default interpreter. should use ruby solution cross-platform (and faster, since there's no process spawning):

directory '/var/www/html'   action :delete   not_if { file.symlink?('/var/www/html') } end 

Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -