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

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

javascript - jquery or ashx not working -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -