lib/bluepill/controller.rb in bluepill-rwgps-0.0.62 vs lib/bluepill/controller.rb in bluepill-rwgps-0.0.63
- old
+ new
@@ -88,23 +88,23 @@
self.running_applications.each do |app|
pid = pid_for(app)
if !pid || !System.pid_alive?(pid)
pid_file = File.join(self.pids_dir, "#{app}.pid")
sock_file = File.join(self.sockets_dir, "#{app}.sock")
- File.unlink(pid_file) if File.exists?(pid_file)
- File.unlink(sock_file) if File.exists?(sock_file)
+ File.unlink(pid_file) if File.exist?(pid_file)
+ File.unlink(sock_file) if File.exist?(sock_file)
end
end
end
def pid_for(app)
pid_file = File.join(self.pids_dir, "#{app}.pid")
- File.exists?(pid_file) && File.read(pid_file).to_i
+ File.exist?(pid_file) && File.read(pid_file).to_i
end
def setup_dir_structure
[@sockets_dir, @pids_dir].each do |dir|
- FileUtils.mkdir_p(dir) unless File.exists?(dir)
+ FileUtils.mkdir_p(dir) unless File.exist?(dir)
end
end
def verify_version!(application)
begin