# File httpd/lib/symbiosis/config_files/apache.rb, line 85 def enable(fn = nil, force = false) # # Take the filename and and replace available with enabled if no # filename is given. # fn = self.filename.sub("sites-available","sites-enabled") if fn.nil? # # Do nothing if we're already enabled. # return if self.enabled?(fn) # # Clobber any files in the way, if the force flag is set. # if force and File.exists?(fn) File.unlink(fn) end # # If the file is still there after disabling, raise an error # raise Errno::EEXIST, fn if File.exists?(fn) # # Symlink away! # File.symlink(self.filename, fn) nil end