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

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -