def aliases
results = []
results << File.split(self.directory).last
if File.directory?(self.directory)
self_stat = File.stat(self.directory)
Dir.glob( File.join(self.prefix,"*") ) do |entry|
next unless File.directory?(entry)
target_stat = File.stat(entry)
target_lstat = File.lstat(entry)
next unless target_lstat.ino != target_stat.ino and target_stat.ino == self_stat.ino
this_domain = File.split(entry).last
next if this_domain =~ /^\./
results << this_domain
end
end
results.each do |this_domain|
next if this_domain =~ /^www\./
this_domain = "www."+this_domain
next if results.include?(this_domain)
next if File.exists?(File.join(self.prefix, this_domain))
results << this_domain
end
results.delete(self.name)
results.sort.uniq
end